protected function isValidZip( $fullpath ) {

		$result = $this->zip->open( $fullpath );

		if ( true !== $result ) {
			throw new \Exception( 'Opening docx file failed' );
		}
		// check if a document.xml exists
		$path = $this->getTargetPath( self::DOCUMENT_SCHEMA );

		$ok = $this->getZipContent( $path );

		if ( ! $ok ) {
			throw new \Exception( 'Bad or corrupted _rels/.rels' );
		}
	}
protected function isValidZip( $fullpath ) {

		$result = $this->zip->open( $fullpath );

		if ( true !== $result ) {
			throw new \Exception( 'Opening docx file failed' );
		}
		// check if a document.xml exists
		$path = $this->getTargetPath( self::DOCUMENT_SCHEMA );

		$ok = $this->getZipContent( $path );

		if ( ! $ok ) {
			throw new \Exception( 'Bad or corrupted _rels/.rels' );
		}
	}
protected function isValidZip ( $ fullpath ) { $ result = $ this -> zip -> open ( $ fullpath ) ; if ( true !== $ result ) { throw new \ Exception ( 'Opening docx file failed' ) ; } // check if a document.xml exists $ path = $ this -> getTargetPath ( self :: DOCUMENT_SCHEMA ) ; $ ok = $ this -> getZipContent ( $ path ) ; if ( ! $ ok ) { throw new \ Exception ( 'Bad or corrupted _rels/.rels' ) ; } }
Checks for standard DOCX file structure

@param string $fullpath

@throws \Exception
Checks for standard DOCX file structure