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