/** * Write closing tag and close stream * * @param string $type * @return void */ protected function _finalizeSitemap($type = self::TYPE_URL) { if ($this->_stream) { $this->_stream->write(sprintf($this->_tags[$type][self::CLOSE_TAG_KEY], $type)); $this->_stream->close(); } // Reset all counters $this->_lineCount = 0; $this->_fileSize = 0; }
/** * Close file handle */ public function __destruct() { if (is_object($this->_file)) { $this->_file->close(); } }
/** * Object destructor. * * @return void */ public function destruct() { if (is_object($this->_fileHandler)) { $this->_fileHandler->close(); } }