當前位置: 首頁>>代碼示例>>PHP>>正文


PHP XmlWriter::flush方法代碼示例

本文整理匯總了PHP中XmlWriter::flush方法的典型用法代碼示例。如果您正苦於以下問題:PHP XmlWriter::flush方法的具體用法?PHP XmlWriter::flush怎麽用?PHP XmlWriter::flush使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在XmlWriter的用法示例。


在下文中一共展示了XmlWriter::flush方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: execute

 public function execute($input)
 {
     $this->isRoot = true;
     $this->writer = new XMLWriter();
     $this->writer->openMemory();
     $this->writer->startDocument('1.0', 'UTF-8');
     $this->writer->setIndent(true);
     $this->run($input);
     return $this->writer->flush();
 }
開發者ID:danharper,項目名稱:jsonx,代碼行數:10,代碼來源:ToJSONx.php

示例2: writeObject

 /**
  * writeObject will write the RSS representation of Object.
  *
  * @param object $object
  *
  * @throws \LogicException if no writer can handle $object or if $object is not an object
  */
 public function writeObject($object)
 {
     if (!is_object($object)) {
         throw new \LogicException(sprintf('%s::%s expects an object. %s given.', __CLASS_, __METHOD__, gettype($object)));
     }
     $fqcn = get_class($object);
     if (!isset($this->writers[$fqcn])) {
         throw new \LogicException(sprintf('No writer found for class %s', $fqcn));
     }
     call_user_func($this->writers[$fqcn], $this, $object);
     if ($this->flushEarly) {
         $this->xmlWriter->flush();
     }
 }
開發者ID:marcw,項目名稱:rss-writer,代碼行數:21,代碼來源:RssWriter.php

示例3: flush

 public function flush()
 {
     $this->cursor->endDocument();
     return $this->cursor->flush();
 }
開發者ID:GromNaN,項目名稱:oxm,代碼行數:5,代碼來源:WriterHelper.php

示例4: flush

 public function flush()
 {
     $this->writer->flush();
 }
開發者ID:JoshBour,項目名稱:karolina,代碼行數:4,代碼來源:SitemapXmlParser.php

示例5: XmlWriter

<?php

$xml = new XmlWriter();
$xml->openMemory();
$xml->setIndent(true);
$xml->startDocument();
$xml->startElement('test');
$xml->writeElement('foo', null);
$xml->writeElement('foo2', "");
$xml->writeElement('foo3');
$xml->startElement('bar');
$xml->endElement('bar');
$xml->endElement();
$xml->endElement();
print $xml->flush(true);
print "\n";
$xw = new XMLWriter();
$xw->openMemory();
$xw->setIndent(true);
$xw->startDocument();
$xw->startElementNS('test', 'test', 'urn:x-test:');
$xw->writeElementNS('test', 'foo', null, '');
$xw->writeElementNS(null, 'bar', 'urn:x-test:', '');
$xw->writeElementNS(null, 'bar', 'urn:x-test:', NULL);
$xw->writeElementNS(null, 'bar', 'urn:x-test:');
$xw->writeElementNS(null, 'bar', '', '');
$xw->endElement();
$xw->endDocument();
print $xw->flush(true);
開發者ID:badlamer,項目名稱:hhvm,代碼行數:29,代碼來源:bug41326.php

示例6: flush

 /**
  * The parameter is merely to comply with PHP's notion that I am
  * overriding the parent's flush, so I should provide the same
  * signature. Nor am I not, but, even if I was, PHP should allow
  * different signatures, i.e., enable both methods to be called...
  *
  * @see XMLWriter::flush()
  */
 public function flush($empty = true)
 {
     parent::endDocument();
     return parent::flush($empty);
 }
開發者ID:rasismeiro,項目名稱:cintient,代碼行數:13,代碼來源:XmlDoc.php


注:本文中的XmlWriter::flush方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。