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


PHP Writer::writeCData方法代碼示例

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


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

示例1: xmlSerialize

 /**
  * The xmlSerialize metod is called during xml writing.
  *
  * Use the $writer argument to write its own xml serialization.
  *
  * An important note: do _not_ create a parent element. Any element
  * implementing XmlSerializble should only ever write what's considered
  * its 'inner xml'.
  *
  * The parent of the current element is responsible for writing a
  * containing element.
  *
  * This allows serializers to be re-used for different element names.
  *
  * If you are opening new elements, you must also close them again.
  *
  * @param Writer $writer
  * @return void
  */
 function xmlSerialize(Xml\Writer $writer)
 {
     $writer->writeCData($this->value);
 }
開發者ID:sMataruev,項目名稱:sabre-xml,代碼行數:23,代碼來源:Cdata.php

示例2: serializeXml

 /**
  * The serialize method is called during xml writing.
  *
  * It should use the $writer argument to encode this object into XML.
  *
  * Important note: it is not needed to create the parent element. The
  * parent element is already created, and we only have to worry about
  * attributes, child elements and text (if any).
  *
  * Important note 2: If you are writing any new elements, you are also
  * responsible for closing them.
  *
  * @param XML\Writer $writer
  * @return void
  */
 public function serializeXml(XML\Writer $writer)
 {
     $writer->writeCData($this->value);
 }
開發者ID:kalmas,項目名稱:sabre-xml,代碼行數:19,代碼來源:Cdata.php


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