protected function getManifestFromZipFile()
    {
        $this->zip = new \ZipArchive();
        if (true !== $this->zip->open($this->zipFile)) {
            throw new InternalServerErrorException('Failed to open imported zip file.');
        }

        $password = $this->getPassword();
        if (!empty($password)) {
            $this->zip->setPassword($password);
        }

        $manifest = $this->zip->getFromName('package.json');
        if (false === $manifest) {
            throw new BadRequestException('Cannot read package manifest. A valid password is required if this is a secured package.');
        }
        $manifest = DataFormatter::jsonToArray($manifest);

        return $manifest;
    }
protected function getManifestFromZipFile()
    {
        $this->zip = new \ZipArchive();
        if (true !== $this->zip->open($this->zipFile)) {
            throw new InternalServerErrorException('Failed to open imported zip file.');
        }

        $password = $this->getPassword();
        if (!empty($password)) {
            $this->zip->setPassword($password);
        }

        $manifest = $this->zip->getFromName('package.json');
        if (false === $manifest) {
            throw new BadRequestException('Cannot read package manifest. A valid password is required if this is a secured package.');
        }
        $manifest = DataFormatter::jsonToArray($manifest);

        return $manifest;
    }
protected function getManifestFromZipFile ( ) { $ this -> zip = new \ ZipArchive ( ) ; if ( true !== $ this -> zip -> open ( $ this -> zipFile ) ) { throw new InternalServerErrorException ( 'Failed to open imported zip file.' ) ; } $ password = $ this -> getPassword ( ) ; if ( ! empty ( $ password ) ) { $ this -> zip -> setPassword ( $ password ) ; } $ manifest = $ this -> zip -> getFromName ( 'package.json' ) ; if ( false === $ manifest ) { throw new BadRequestException ( 'Cannot read package manifest. A valid password is required if this is a secured package.' ) ; } $ manifest = DataFormatter :: jsonToArray ( $ manifest ) ; return $ manifest ; }
Retrieves the manifest file from package file.

@return array|string
@throws \DreamFactory\Core\Exceptions\InternalServerErrorException
@throws \DreamFactory\Core\Exceptions\BadRequestException
Retrieves the manifest file from package file .