/** * Throws exception * @param array $input */ public function __set($key, $value) { if ($this->immutable) { $this->throwException(); } parent::offsetSet($key, $value); }
/** * Get all the registered keys for contents of this container * @return array * Array of string keys */ public function keys() { return array_keys(parent::getArrayCopy()); }
public function __construct(array $input) { $defaults = ['value' => '', 'domain' => null, 'path' => null, 'expires' => null, 'secure' => false, 'httponly' => false]; $values = array_replace($defaults, $input); parent::__construct($values); }