Пример #1
0
 public function offsetSet($k, $v = null)
 {
     if (!$this->verify($k)) {
         return false;
     }
     return parent::offsetSet($k, $v);
 }
Пример #2
0
 public function offsetSet($k, $v)
 {
     if (is_callable([$this, 'verify_' . $k])) {
         return call_user_func([$this, 'verify_' . $k], $v);
     }
     if (array_key_exists($k, $this)) {
         throw new InvalidArgumentException('Invalid key. [' . $k . ']');
     }
     return parent::offsetSet($k, $v);
 }
Пример #3
0
 public function offsetSet($k, $v)
 {
     if (is_callable([$this, $k])) {
         return $this->{$k}($v);
     }
     if (!isset($this[$k])) {
         throw new InvalidArgumentException('Invalid key. [' . $k . ']');
     }
     return parent::offsetSet($k, $v);
 }
Пример #4
0
 public function __construct($str)
 {
     parent::__construct();
     $this->rawDocBlock = $str;
     $this->parse();
 }