/** * The Lexicographic List constructor * * Accepts data, and the obligatory options parameter * * Passes the required restrictions onto the parent class along with * the options, the default restrictions limit the data to basic string * but can be overriden with the restrictions parameter * * This instantiates the class and sets the index * * @param mixed $data The data to initialize the queue * @param Falcraft\Data\Types\Resource\AbstractFilter $restrictions * @param array $options The options to pass into the object * */ public function __construct($data = null, Resource\AbstractFilter $restrictions = null, $options = array()) { if (is_array($options)) { $options = array_change_key_case($options); } $this->configure($options); if (!$restrictions) { $this->restrictions = new Restrictions(array(Type::BASIC_STRING)); } else { $this->restrictions = $restrictions; } parent::__construct($data, $this->restrictions, $options); }
/** * The Priority Queue constructor * * Accepts data, and the obligatory options parameter * * Passes the required restrictions onto the parent class along with * the options * * This instantiates the class and sets the index * * @param mixed $data The data to initialize the queue * @param Falcraft\Data\Types\Resource\AbstractFilter $restrictions * The type restrictions * @param mixed $options The options to pass into the object * */ public function __construct($data = null, DataResource\AbstractFilter $restrictions = null, $options = array()) { if (is_array($options)) { $options = array_change_key_case($options); } $this->configure($options); if (!$restrictions) { $this->restrictions = new Restrictions(array(Type::TYPED_OBJECT), array('Falcraft\\Data\\Types\\Resource\\PriorityInterface'), array('autoload' => true)); } else { $this->restrictions = $restrictions; } parent::__construct($data, $this->restrictions, $options); }