public function __construct($type, $items = []) { $type = $this->determineType($type); $this->type = $type; if ($items) { $this->validateItems($items, $this->type); } $this->items = $items; }
/** * Instantiates the collection by specifying what type of Object will be used. * * @param string $objectName Name of the class or interface used in the Collection */ public function __construct($objectName = "{{foo}}") { parent::__construct($objectName); }