当前位置: 首页>>代码示例>>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;未经允许,请勿转载。