protected function getManifestFromLocalFile($file)
    {
        $extension = strtolower(pathinfo($file, PATHINFO_EXTENSION));

        if (static::FILE_EXTENSION != $extension) {
            throw new BadRequestException(
                "Only package files ending with '" .
                static::FILE_EXTENSION .
                "' are allowed for import."
            );
        }

        if (file_exists($file)) {
            $this->zipFile = $file;
        } else {
            throw new InternalServerErrorException("Failed to import. File not found $file");
        }

        return $this->getManifestFromZipFile();
    }
protected function getManifestFromLocalFile($file)
    {
        $extension = strtolower(pathinfo($file, PATHINFO_EXTENSION));

        if (static::FILE_EXTENSION != $extension) {
            throw new BadRequestException(
                "Only package files ending with '" .
                static::FILE_EXTENSION .
                "' are allowed for import."
            );
        }

        if (file_exists($file)) {
            $this->zipFile = $file;
        } else {
            throw new InternalServerErrorException("Failed to import. File not found $file");
        }

        return $this->getManifestFromZipFile();
    }
protected function getManifestFromLocalFile ( $ file ) { $ extension = strtolower ( pathinfo ( $ file , PATHINFO_EXTENSION ) ) ; if ( static :: FILE_EXTENSION != $ extension ) { throw new BadRequestException ( "Only package files ending with '" . static :: FILE_EXTENSION . "' are allowed for import." ) ; } if ( file_exists ( $ file ) ) { $ this -> zipFile = $ file ; } else { throw new InternalServerErrorException ( "Failed to import. File not found $file" ) ; } return $ this -> getManifestFromZipFile ( ) ; }
Retrieves manifest from a local zip file.

@param $file

@return array|string
@throws \DreamFactory\Core\Exceptions\BadRequestException
@throws \DreamFactory\Core\Exceptions\InternalServerErrorException
Retrieves manifest from a local zip file .