Пример #1
0
 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("&amp;", "&", htmlspecialchars($contents)));
         			}
         			else
         			{
         				$this->stream->write(htmlspecialchars($contents));
         			}
         */
     }
     $this->stream->write("</" . $tagName . ">");
 }
Пример #2
0
 /**
  * @param string $string
  * @param string $type
  */
 public function write($string, $type = self::TYPE_DEFAULT)
 {
     $this->writer->write($string);
 }
Пример #3
0
 /**
  * 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;
 }
Пример #5
0
 function FilterWriter(&$writer)
 {
     if (IWriter::validClass($writer)) {
         $this->writer =& $writer;
     }
 }