Lines Matching refs:comptype

20     protected $comptype = self::COMPRESS_AUTO;  variable in VerboseTar
30 * @param int $comptype
33 public function open($file, $comptype = self::COMPRESS_AUTO) { argument
35 if($comptype == self::COMPRESS_AUTO) $comptype = $this->filetype($file);
36 $this->compressioncheck($comptype);
38 $this->comptype = $comptype;
41 if($this->comptype === self::COMPRESS_GZIP) {
43 } elseif($this->comptype === self::COMPRESS_BZIP) {
207 * @param int $comptype
212 public function create($file = '', $comptype = self::COMPRESS_AUTO, $complevel = 9) { argument
214 if($comptype == self::COMPRESS_AUTO) $comptype = $this->filetype($file);
215 $this->compressioncheck($comptype);
217 $this->comptype = $comptype;
223 if($this->comptype === self::COMPRESS_GZIP) {
225 } elseif($this->comptype === self::COMPRESS_BZIP) {
329 if($this->comptype === self::COMPRESS_GZIP) {
331 } elseif($this->comptype === self::COMPRESS_BZIP) {
349 public function getArchive($comptype = self::COMPRESS_AUTO, $complevel = 9) { argument
352 if($comptype === self::COMPRESS_AUTO) $comptype = $this->comptype;
353 $this->compressioncheck($comptype);
355 if($comptype === self::COMPRESS_GZIP) return gzcompress($this->memory, $complevel);
356 if($comptype === self::COMPRESS_BZIP) return bzcompress($this->memory);
367 * @param int $comptype
371 public function save($file, $comptype = self::COMPRESS_AUTO, $complevel = 9) { argument
372 if($comptype === self::COMPRESS_AUTO) $comptype = $this->filetype($file);
374 if(!file_put_contents($file, $this->getArchive($comptype, $complevel))) {
386 if($this->comptype === self::COMPRESS_GZIP) {
388 } elseif($this->comptype === self::COMPRESS_BZIP) {
406 } elseif($this->comptype === self::COMPRESS_GZIP) {
408 } elseif($this->comptype === self::COMPRESS_BZIP) {
425 if($this->comptype === self::COMPRESS_GZIP) {
427 } elseif($this->comptype === self::COMPRESS_BZIP) {
564 protected function compressioncheck($comptype) { argument
565 if($comptype === self::COMPRESS_GZIP && !function_exists('gzopen')) {
569 if($comptype === self::COMPRESS_BZIP && !function_exists('bzopen')) {
585 $comptype = self::COMPRESS_GZIP;
587 $comptype = self::COMPRESS_BZIP;
589 $comptype = self::COMPRESS_NONE;
591 return $comptype;