protected function _setFactory($factory)
    {
        if ($factory !== null && !($factory instanceof FactoryInterface)) {
            throw $this->_createInvalidArgumentException(
                $this->__('Argument is not a valid factory instance'),
                null,
                null,
                $factory
            );
        }
        $this->factory = $factory;
    }
protected function _setFactory($factory)
    {
        if ($factory !== null && !($factory instanceof FactoryInterface)) {
            throw $this->_createInvalidArgumentException(
                $this->__('Argument is not a valid factory instance'),
                null,
                null,
                $factory
            );
        }
        $this->factory = $factory;
    }
protected function _setFactory ( $ factory ) { if ( $ factory !== null && ! ( $ factory instanceof FactoryInterface ) ) { throw $ this -> _createInvalidArgumentException ( $ this -> __ ( 'Argument is not a valid factory instance' ) , null , null , $ factory ) ; } $ this -> factory = $ factory ; }
Sets the factory for this instance.

@since [*next-version*]

@param FactoryInterface|null $factory The factory instance to set, if any.
Sets the factory for this instance .