Ejemplo n.º 1
0
 /**
  * Mixin an object
  *
  * Reset the computed_properties after a behavior has been mixed that has mixable methods
  *
  * @param   mixed $identifier An ObjectIdentifier, identifier string or object implementing ObjectMixableInterface
  * @param  array $config  An optional associative array of configuration options
  * @return  ObjectMixinInterface
  * @throws  ObjectExceptionInvalidIdentifier If the identifier is not valid
  * @throws  \UnexpectedValueException If the mixin does not implement the ObjectMixinInterface
  */
 public function mixin($mixin, $config = array())
 {
     $mixin = parent::mixin($mixin, $config);
     //Reset the computed properties array
     $methods = $mixin->getMixableMethods();
     if (!empty($methods)) {
         $this->__computed_properties = null;
     }
     return $mixin;
 }