public function convertToText()
    {
        $pathInfo = pathinfo($this->filename);
        switch (strtolower($pathInfo['extension'])) {
            case 'docx':
                return $this->readDocx();
            case 'xlsx':
                return $this->readXlsx();
            case 'pptx':
                return $this->readPptx();

            default:
                throw new \InvalidArgumentException('File extension "' . $pathInfo['extension'] . '" not supported!');
        }
    }
public function convertToText()
    {
        $pathInfo = pathinfo($this->filename);
        switch (strtolower($pathInfo['extension'])) {
            case 'docx':
                return $this->readDocx();
            case 'xlsx':
                return $this->readXlsx();
            case 'pptx':
                return $this->readPptx();

            default:
                throw new \InvalidArgumentException('File extension "' . $pathInfo['extension'] . '" not supported!');
        }
    }
public function convertToText ( ) { $ pathInfo = pathinfo ( $ this -> filename ) ; switch ( strtolower ( $ pathInfo [ 'extension' ] ) ) { case 'docx' : return $ this -> readDocx ( ) ; case 'xlsx' : return $ this -> readXlsx ( ) ; case 'pptx' : return $ this -> readPptx ( ) ; default : throw new \ InvalidArgumentException ( 'File extension "' . $ pathInfo [ 'extension' ] . '" not supported!' ) ; } }
Extract text from given OOXML file

@return string
@throws \InvalidArgumentException
Extract text from given OOXML file