public function __construct($file) { parent::__construct($file, FileDecoder::DECODER_DIRECT); $this->tResource = fopen($file, "r"); if ($this->tResource === false) { throw new Exception(Log::err("Cannot open file '{$file}' for reading")); } }
public function __construct($file) { parent::__construct($file, FileDecoder::DECODER_AUTO); foreach (self::$sDecoders as $pattern => $decoderClass) { if (fnmatch($pattern, $file)) { $this->tDecoder = new $decoderClass($file); break; } } }
public function __construct($file) { parent::__construct($file, FileDecoder::DECODER_BZIP2); if (!extension_loaded("bz2")) { throw new Exception(Log::err("Missing extension 'bz2' for bzip2 decoding")); } $this->tResource = bzopen($file, "r"); if ($this->tResource === false) { throw new Exception(Log::err("Cannot open file '{$file}' for reading")); } }