Example #1
0
 /**
  * Proxies call to specification and if argument is a dsl call than it calls
  * the interceptor factory for the returned value
  *
  * @param string $attribute 
  * @return mixed
  */
 public function __get($attribute)
 {
     $dslResult = parent::__get($attribute);
     if (!is_null($dslResult)) {
         return $dslResult;
     }
     if (isset($this->getActualValue()->{$attribute})) {
         return InterceptorFactory::create($this->getActualValue()->{$attribute});
     }
     trigger_error("Undefined property: " . get_class($this->getActualValue()) . "::{$attribute}", E_USER_NOTICE);
 }
Example #2
0
 /**
  * Proxies call to specification and if argument is a dsl call than it calls
  * the interceptor factory for the returned value
  *
  * @param string $attribute
  * @return mixed
  */
 public function __get($attribute)
 {
     $dslResult = parent::__get($attribute);
     if (is_object($dslResult) && isset($dslResult->_expectation)) {
         return $dslResult;
     }
     return InterceptorFactory::create($this->getActualValue()->{$attribute});
 }