original_string: public function getZipFromZip($file)
      {
          $fh = $this->zip->getStream($file);
          if (false !== $fh) {
              $contents = null;
              while (!feof($fh)) {
                  $contents .= fread($fh, 2);
              }
              $tmpDir = rtrim(sys_get_temp_dir(), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;
              $zipFile = $tmpDir . md5($file) . time() . '.' . static::FILE_EXTENSION;
              file_put_contents($zipFile, $contents);
  
              $zip = new \ZipArchive();
              if (true !== $zip->open($zipFile)) {
                  throw new InternalServerErrorException('Error opening zip file ' . $file . '.');
              }
              $this->destructible[] = $zipFile;
  
              return $zip;
          }
  
          return null;
      }
code: public function getZipFromZip($file)
      {
          $fh = $this->zip->getStream($file);
          if (false !== $fh) {
              $contents = null;
              while (!feof($fh)) {
                  $contents .= fread($fh, 2);
              }
              $tmpDir = rtrim(sys_get_temp_dir(), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;
              $zipFile = $tmpDir . md5($file) . time() . '.' . static::FILE_EXTENSION;
              file_put_contents($zipFile, $contents);
  
              $zip = new \ZipArchive();
              if (true !== $zip->open($zipFile)) {
                  throw new InternalServerErrorException('Error opening zip file ' . $file . '.');
              }
              $this->destructible[] = $zipFile;
  
              return $zip;
          }
  
          return null;
      }
code_tokens: public function getZipFromZip ( $ file ) { $ fh = $ this -> zip -> getStream ( $ file ) ; if ( false !== $ fh ) { $ contents = null ; while ( ! feof ( $ fh ) ) { $ contents .= fread ( $ fh , 2 ) ; } $ tmpDir = rtrim ( sys_get_temp_dir ( ) , DIRECTORY_SEPARATOR ) . DIRECTORY_SEPARATOR ; $ zipFile = $ tmpDir . md5 ( $ file ) . time ( ) . '.' . static :: FILE_EXTENSION ; file_put_contents ( $ zipFile , $ contents ) ; $ zip = new \ ZipArchive ( ) ; if ( true !== $ zip -> open ( $ zipFile ) ) { throw new InternalServerErrorException ( 'Error opening zip file ' . $ file . '.' ) ; } $ this -> destructible [ ] = $ zipFile ; return $ zip ; } return null ; }
docstring: Retrieves zipped folder from ZipArchive.
  
  @param $file
  
  @return null|\ZipArchive
  @throws \DreamFactory\Core\Exceptions\InternalServerErrorException
docstring_tokens: Retrieves zipped folder from ZipArchive .