public function factory( $adapter, $options = null )
    {
        $adapter = parent::factory( $adapter, $options );
        $adapter->setModel( $this->getModel() );

        if ( $adapter instanceof ServiceLocatorAwareInterface )
        {
            $adapter->setServiceLocator( $this->getServiceLocator() );
        }

        return $adapter;
    }
public function factory( $adapter, $options = null )
    {
        $adapter = parent::factory( $adapter, $options );
        $adapter->setModel( $this->getModel() );

        if ( $adapter instanceof ServiceLocatorAwareInterface )
        {
            $adapter->setServiceLocator( $this->getServiceLocator() );
        }

        return $adapter;
    }
public function factory ( $ adapter , $ options = null ) { $ adapter = parent :: factory ( $ adapter , $ options ) ; $ adapter -> setModel ( $ this -> getModel ( ) ) ; if ( $ adapter instanceof ServiceLocatorAwareInterface ) { $ adapter -> setServiceLocator ( $ this -> getServiceLocator ( ) ) ; } return $ adapter ; }
Factory an object

@param string|object|array $adapter
@param object|array|null $options
@return \Zork\Factory\AdapterInterface
Factory an object