public function setEntityFactory(EntityFactory $factory = null)
    {
        if ($factory === null) {
            $factory = new Entity();
        }
        $this->factory = $factory;
        return $this;
    }
public function setEntityFactory(EntityFactory $factory = null)
    {
        if ($factory === null) {
            $factory = new Entity();
        }
        $this->factory = $factory;
        return $this;
    }
public function setEntityFactory ( EntityFactory $ factory = null ) { if ( $ factory === null ) { $ factory = new Entity ( ) ; } $ this -> factory = $ factory ; return $ this ; }
Sets the Entity Factory which will create the Entities from Responses
@param EntityFactory $factory
@return $this
Sets the Entity Factory which will create the Entities from Responses