core\util\class-array-util.php
Méthodes utilitaires pour les tableaux.
- Author
- Eoxia
- Copyright
- 2015-2018 Eoxia
- Package
- EO_Framework\Core\Util
- Since
- 0.1.0
- Version
- 1.0.0
\eoxia\Array_Util
Package: EO_Framework\Core\Util






Gestion des tableaux
- Parent(s)
- \eoxia\Singleton_Util
- Inherited_from
- \eoxia\Singleton_Util
Properties
Methods

__construct() : voidfinalinherited
Appelle le constructeur parent
Inherited from:Details
- Since
- 0.1.0
- Version
- 1.0.0

construct() : voidLe constructeur obligatoirement pour utiliser la classe \eoxia\Singleton_Util
Details
- Since
- 0.1.0
- Version
- 1.0.0

construct() : voidabstractinherited
Le constructeur pour les enfants
Inherited from:Details
- Since
- 0.1.0
- Version
- 1.0.0

count_recursive(array $array, boolean $start = true, array $match_element = array()) : integerCompte le nombre de valeur dans un tableau avec récursivité en vérifiant que $match_element soit dans la valeur
Parameters
Returns
Details
| Name | Type | Description |
|---|---|---|
| $array | array | Les données pour la moulinette. |
| $start | boolean | Initialise count avec le tableau du premier niveau. |
| $match_element | array | Doit être un tableau contenant des integers. |
| Type | Description |
|---|---|
| integer | Le nombre d'entrée |
- Since
- 1.0.0
- Version
- 1.0.0

g() : \eoxia\Singleton_Utilstaticfinalinherited
Récupères l'instance courante
Inherited from:Returns
Details
| Type | Description |
|---|---|
| \eoxia\Singleton_Util | L'instance courante |
- Since
- 0.1.0
- Version
- 1.0.0

recursive_wp_parse_args(mixed $a, mixed $default) : arrayRécursive wp_parse_args de WordPress.
Parameters
Returns
Details
| Name | Type | Description |
|---|---|---|
| $a | mixed | Les données a mergées. |
| $default | mixed | Les données par défaut. |
| Type | Description |
|---|---|
| array | Les données mergées. |
- Since
- 1.0.0
- Version
- 1.0.0

switch_key(Array $array, mixed $value, integer $to_key = 0) : ArrayDéplaces l'index du tableau vers l'index $to_key.
Parameters
Returns
Details
| Name | Type | Description |
|---|---|---|
| $array | Array | Les valeurs contenu dans le tableau. Le tableau ne doit pas être 2D. |
| $value | mixed | Tous types de valeurs. |
| $to_key | integer | La clé qui vas être déplacer. Defaut 0 |
| Type | Description |
|---|---|
| Array | Le tableau. |
- Since
- 0.5.0
- Version
- 1.0.0