/** * Constructor * * Takes array of Links and creates internal structure of associated array using * each Entry name as the key * * @param array $values Array[Link,...] of initial control account entries */ public function __construct(array $values = []) { parent::__construct(\array_combine(\array_map(function (Link $link) { return $link->getName()->get(); }, $values), $values), 'SAccounts\\Control\\Link'); }
/** * Constructor * * Enforces Collection to be of type SAccounts\Transaction\Entry * * @param array $value Associative array of data to set */ public function __construct(array $value = []) { parent::__construct($value, 'SAccounts\\Transaction\\Entry'); }