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


PHP Xml::__construct方法代碼示例

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


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

示例1: __construct

 /**
  * Start the stream reader/writer as if it is a XML document.
  *
  * @param   \Hoa\Stream\IStream\In  $stream                 Stream to
  *                                                          read/write.
  * @param   bool                    $initializeNamespace    Whether we
  *                                                          initialize
  *                                                          namespaces.
  * @param   mixed                   $entityResolver         Entity resolver.
  * @param   bool                    $autoSave               Whether we
  *                                                          should
  *                                                          auto-save.
  * @return  void
  * @throws  \Hoa\Xml\Exception
  */
 public function __construct(Stream\IStream\In $stream, $initializeNamespace = true, $entityResolver = null, $autoSave = true)
 {
     if (true === $autoSave && !$stream instanceof Stream\IStream\Out) {
         throw new Exception('The stream %s (that has opened %s) must implement ' . '\\Hoa\\Stream\\IStream\\In and \\Hoa\\Stream\\IStream\\Out interfaces.', 0, [get_class($stream), $stream->getStreamName()]);
     }
     parent::__construct('\\Hoa\\Xml\\Element\\ReadWrite', $stream, $initializeNamespace, $entityResolver);
     if (true === $autoSave) {
         event('hoa://Event/Stream/' . $stream->getStreamName() . ':close-before')->attach(xcallable($this, '_close'));
     }
     $this->_autoSave = $autoSave;
     return;
 }
開發者ID:Grummfy,項目名稱:Central,代碼行數:27,代碼來源:ReadWrite.php

示例2: __construct

 /**
  * Start the stream reader as if it is a XML document.
  *
  * @param   \Hoa\Stream\IStream\In  $stream                 Stream to read.
  * @param   bool                    $initializeNamespace    Whether we
  *                                                          initialize
  *                                                          namespaces.
  * @param   mixed                   $entityResolver         Entity resolver.
  * @return  void
  */
 public function __construct(Stream\IStream\In $stream, $initializeNamespace = true, $entityResolver = null)
 {
     parent::__construct('\\Hoa\\Xml\\Element\\Read', $stream, $initializeNamespace, $entityResolver);
     return;
 }
開發者ID:Grummfy,項目名稱:Central,代碼行數:15,代碼來源:Read.php

示例3: __construct

 /**
  * Start the stream reader/writer as if it is a XML document.
  *
  * @param   \Hoa\Stream\IStream\Out  $stream                 Stream to
  *                                                           read/write.
  * @param   bool                     $initializeNamespace    Whether we
  *                                                           initialize
  *                                                           namespaces.
  * @param   mixed                    $entityResolver         Entity resolver.
  * @return  void
  */
 public function __construct(Stream\IStream\Out $stream, $initializeNamespace = true, $entityResolver = null)
 {
     parent::__construct('\\Hoa\\Xml\\Element\\Write', $stream, $initializeNamespace, $entityResolver);
     event('hoa://Event/Stream/' . $stream->getStreamName() . ':close-before')->attach(xcallable($this, '_close'));
     return;
 }
開發者ID:Grummfy,項目名稱:Central,代碼行數:17,代碼來源:Write.php


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