PHP Class Vinelab\Minion\Dictionary

Author: Abed Halawi ([email protected])
Afficher le fichier Open project: vinelab/minion Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( array $attributes )
__get ( string $attribute ) : mixed Override the magic __get to reach the attribtues of this dictionary.
__isset ( string $attribute ) : boolean Override to support calling isset() on attributes of this dictionary.
make ( mixed $attributes ) : Dictionary Get a new dictionary with the given attributes.
toArray ( ) : array Get the array representation of this dictionary.
toKeyValue ( array $values ) : array Transform the given array of values into a key-value pair recursively.

Method Details

__construct() public méthode

public __construct ( array $attributes )
$attributes array

__get() public méthode

Override the magic __get to reach the attribtues of this dictionary.
public __get ( string $attribute ) : mixed
$attribute string
Résultat mixed

__isset() public méthode

Override to support calling isset() on attributes of this dictionary.
public __isset ( string $attribute ) : boolean
$attribute string
Résultat boolean

make() public static méthode

Get a new dictionary with the given attributes.
public static make ( mixed $attributes ) : Dictionary
$attributes mixed
Résultat Dictionary

toArray() public méthode

Get the array representation of this dictionary.
public toArray ( ) : array
Résultat array

toKeyValue() public méthode

Transform the given array of values into a key-value pair recursively.
public toKeyValue ( array $values ) : array
$values array
Résultat array