protected function parseNode($tagName, array $attrs, &$contents) { $this->stream->write("<" . $tagName); if (!empty($attrs)) { $this->stream->write(" " . $this->compileAttributes($attrs)); } $this->stream->write(">"); if (is_array($contents)) { $this->parseNodes($contents); } else { $this->stream->write(htmlspecialchars($contents)); /* if ( $tagName != "title" ) { $this->stream->write(str_replace("&", "&", htmlspecialchars($contents))); } else { $this->stream->write(htmlspecialchars($contents)); } */ } $this->stream->write("</" . $tagName . ">"); }
/** * @param string $string * @param string $type */ public function write($string, $type = self::TYPE_DEFAULT) { $this->writer->write($string); }
/** * Save the World. * * @return \XML */ public function save() { $this->writer->set($this); return $this->writer->save(); }
/** * @return MySqlBackup */ private function add($string) { $this->stream->write($string); return $this; }
function FilterWriter(&$writer) { if (IWriter::validClass($writer)) { $this->writer =& $writer; } }