public function getWriterByName($fp, $writerName)
    {
        $method = 'get' . $writerName;
        if(method_exists($this->getWriterFactory(), $method)) {
            return $this->getWriterFactory()->$method($fp);
        } else {
            throw new \InvalidArgumentException('writer not found: ' . $writerName);
        }
    }
public function getWriterByName($fp, $writerName)
    {
        $method = 'get' . $writerName;
        if(method_exists($this->getWriterFactory(), $method)) {
            return $this->getWriterFactory()->$method($fp);
        } else {
            throw new \InvalidArgumentException('writer not found: ' . $writerName);
        }
    }
public function getWriterByName ( $ fp , $ writerName ) { $ method = 'get' . $ writerName ; if ( method_exists ( $ this -> getWriterFactory ( ) , $ method ) ) { return $ this -> getWriterFactory ( ) -> $ method ( $ fp ) ; } else { throw new \ InvalidArgumentException ( 'writer not found: ' . $ writerName ) ; } }
Get a writer by it's name. The name is looked up in the writer factory prefixed with "get".

@example $writer = $factory->getWriterByName($fp, 'OfficeOpenXML2003StreamWriter');
@param stream $fp
@param string $writerName
@return Writer
Get a writer by it s name . The name is looked up in the writer factory prefixed with get .