Exemple #1
0
 /**
  * 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;
 }
Exemple #2
0
 /**
  * Close file handle
  */
 public function __destruct()
 {
     if (is_object($this->_file)) {
         $this->_file->close();
     }
 }
Exemple #3
0
 /**
  * Object destructor.
  *
  * @return void
  */
 public function destruct()
 {
     if (is_object($this->_fileHandler)) {
         $this->_fileHandler->close();
     }
 }