__get() public method

public __get ( $property )
コード例 #1
0
ファイル: spec.php プロジェクト: atoum/bdd-extension
 public function __get($property)
 {
     if (preg_match('/^invoking(.+)$/', $property, $matches) > 0) {
         $arguments = func_get_args();
         $arguments[0] = $matches[1];
         return call_user_func_array(array($this, 'invoking'), $arguments);
     }
     if ($property === 'testedInstance') {
         try {
             return parent::__get($property);
         } catch (atoum\exceptions\runtime $e) {
             return $this->newTestedInstance;
         }
     }
     return parent::__get($property);
 }