original_string: 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();
      }
code: 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();
      }
code_tokens: 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 ( ) ; }
docstring: Retrieves manifest from a local zip file.
  
  @param $file
  
  @return array|string
  @throws \DreamFactory\Core\Exceptions\BadRequestException
  @throws \DreamFactory\Core\Exceptions\InternalServerErrorException
docstring_tokens: Retrieves manifest from a local zip file .