3 * Helper that enables access to private and protected methods and properties.
9 public function __construct($obj)
14 public function __call($method, $arguments)
16 $rm = new ReflectionMethod($this->obj, $method);
17 $rm->setAccessible(true);
18 return $rm->invokeArgs($this->obj, $arguments);
21 public static function __callStatic($method, $arguments)
23 $rm = new ReflectionMethod($this->obj, $method);
24 $rm->setAccessible(true);
25 return $rm->invokeArgs($this->obj, $arguments);
28 public function __set($var, $value)
30 $rp = new ReflectionProperty($this->obj, $var);
31 $rp->setAccessible(true);
32 $rp->setValue($this->obj, $value);
35 public function __get($var)
37 $rp = new ReflectionProperty($this->obj, $var);
38 $rp->setAccessible(true);
39 return $rp->getValue($this->obj);