MAKS\AmqpAgent\Helper\ArrayProxy
A class containing methods for for manipulating and working with arrays.
Get example:
```
ArrayProxy::get($array, 'someKey', 'this is a default/fallback value to use instead if not found');
```
Set example:
```
ArrayProxy::set($array, 'someKey', $newValue);
```
Cast (array to string) example:
```
ArrayProxy::arrayToString($array);
```
Cast (array to object) example:
```
ArrayProxy::arrayToObject($array);
```
Cast (object to array) example:
```
ArrayProxy::objectToArray($object);
```
Synopsis
- // Inherited methods from ArrayProxyTrait
- public static mixed getArrayValueByKey()
- public static mixed get()
- public static bool setArrayValueByKey()
- public static bool set()
- public static string castArrayToString()
- public static string arrayToString()
- public static stdClass castArrayToObject()
- public static stdClass arrayToObject()
- public static array castObjectToArray()
Hierarchy
Coverage
Methods | 0% | 0 / 0 |
Lines | 0% | 0 / 0 |
Methods
Inherited from MAKS\AmqpAgent\Helper\ArrayProxyTrait
public
- arrayToObject() — Converts (casts) an array to an object (stdClass).
- arrayToString() — Returns a string representation of an array by imploding it recursively with common formatting of data-types.
- castArrayToObject() — Converts (casts) an array to an object (stdClass).
- castArrayToString() — Returns a string representation of an array by imploding it recursively with common formatting of data-types.
- castObjectToArray() — Converts (casts) an object to an associative array.
- get() — Gets a value from an array via dot-notation representation.
- getArrayValueByKey() — Gets a value from an array via dot-notation representation.
- set() — Sets a value of an array via dot-notation representation.
- setArrayValueByKey() — Sets a value of an array via dot-notation representation.
History
-
2021-01-12T21:10:22+00:00 (commit #b6f57f7)
Author: Marwan Al-Soltany (MarwanAlsoltany@gmail.com) / Commiter: Marwan Al-Soltany (MarwanAlsoltany@gmail.com)
Update array proxy class * Fix typos * Update DocBlocks
-
2021-01-12T21:10:21+00:00 (commit #d09424b)
Author: Marwan Al-Soltany (MarwanAlsoltany@gmail.com) / Commiter: Marwan Al-Soltany (MarwanAlsoltany@gmail.com)
Add strict types declaration * Add declare(strict_types=1) to all files * Fix file header DocBlock spacing of all files
-
2020-12-03T22:40:12+00:00 (commit #73fb09a)
Author: Marwan Al-Soltany (MarwanAlsoltany@gmail.com) / Commiter: Marwan Al-Soltany (MarwanAlsoltany@gmail.com)
Add array proxy class * Add ArrayProxy.php * Add ArrayProxyTrait.php