コード例 #1
0
ファイル: Writer.php プロジェクト: varvanin/currycms
 /**
  * Construct an archive writer.
  *
  * @param string $filename
  * @param string $compression
  */
 public function __construct($filename, $compression)
 {
     parent::__construct($filename, $compression);
 }
コード例 #2
0
ファイル: FileInfo.php プロジェクト: varvanin/currycms
 /**
  * Get the contents of the file and return as string.
  *
  * @return string
  */
 public function getContents()
 {
     if (!$this->isFile()) {
         throw new Exception('Cannot extract non-file');
     }
     if (!$this->size) {
         return '';
     }
     if (!($this->sourceReader && $this->sourcePosition)) {
         throw new Exception('Unable to extract file: ' . $this->filename);
     }
     return $this->sourceReader->extractFromPosition($this->sourcePosition, $this->size);
 }
コード例 #3
0
ファイル: Iterator.php プロジェクト: varvanin/currycms
 /**
  * Create iterator instance.
  *
  * @param Curry_Archive $archive
  * @param array $options
  */
 public function __construct(Curry_Archive $archive, $options = array())
 {
     parent::__construct($archive->getFilename(), $archive->getCompression());
     $this->options = $options;
 }