code/object/decorator/abstract.php
public function setDelegate($delegate)
    {
        if (!is_object($delegate)) {
            throw new \InvalidArgumentException('Delegate needs to be an object, '.gettype($delegate).' given');
        }

        $this->__delegate = $delegate;
        return $this;
    }
public function setDelegate($delegate)
    {
        if (!is_object($delegate)) {
            throw new \InvalidArgumentException('Delegate needs to be an object, '.gettype($delegate).' given');
        }

        $this->__delegate = $delegate;
        return $this;
    }
public function setDelegate ( $ delegate ) { if ( ! is_object ( $ delegate ) ) { throw new \ InvalidArgumentException ( 'Delegate needs to be an object, ' . gettype ( $ delegate ) . ' given' ) ; } $ this -> __delegate = $ delegate ; return $ this ; }
Set the decorated object

@param   object $delegate The decorated object
@return  ObjectDecoratorAbstract
@throws  \InvalidArgumentException If the delegate is not an object
Set the decorated object