Пример #1
0
 /**
  * Unset magic
  * @param string $name
  */
 public function __unset($name)
 {
     Magic::remove($this, $name);
 }
Пример #2
0
 /**
  * Set trait
  * @param string $name
  * @param mixed $value
  * @return mixed
  */
 public function __set($name, $value)
 {
     return Magic::write($this, $name, $value);
 }
Пример #3
0
 /**
  * Get magic
  * @param string $name
  * @return mixed
  */
 public function __get($name)
 {
     return ($value = Magic::read($this, $name)) instanceof None ? isset($this->{$name}) ? $this->{$name} : null : $value;
 }
Пример #4
0
 /**
  * Isset magic
  * @param string $name
  * @return boolean
  */
 function __isset($name)
 {
     return (bool) Magic::exists($this, $name);
 }
Пример #5
0
 /**
  * Call magic
  * @param string $name
  * @param array $arguments
  * @return mixed
  */
 function __call($name, $arguments)
 {
     return Magic::call($this, $name, $arguments);
 }