public function open($filename) { $this->fileHandler = bzopen($filename, "w"); if (false === $this->fileHandler) { throw new Exception("Output file is not writable"); } return true; }