public function __construct($label, $attributes = array()) { parent::__construct($label, $attributes); if (isset($attributes['minimum_selected'])) { $this->minimum_selected = $attributes['minimum_selected']; } }
/** * @param string|array $options */ public function __construct($options = []) { if (is_string($options)) { $this->token = $options; } else { parent::__construct($options); } }
/** * Constructor. Automatically canonicalizes capability, if provided as array or object. * If capability is a string, it is assumed that it's already a canonicalized json_encoded string. */ public function __construct($options = []) { parent::__construct($options); if (is_object($this->capability)) { $this->capability = (array) $this->capability; } if (is_array($this->capability)) { ksort($this->capability); $this->capability = json_encode($this->capability); } }
/** * Returns a peer instance associated with this om. * * Since Peer classes are not to have any instance attributes, this method returns the * same instance for all member of this class. The method could therefore * be static, but this would prevent one from overriding the behavior. * * @return OptionsPeer */ public function getPeer() { if (self::$peer === null) { self::$peer = new OptionsPeer(); } return self::$peer; }