当前位置: 首页>>代码示例>>PHP>>正文


PHP AppendIterator::__construct方法代码示例

本文整理汇总了PHP中AppendIterator::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP AppendIterator::__construct方法的具体用法?PHP AppendIterator::__construct怎么用?PHP AppendIterator::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AppendIterator的用法示例。


在下文中一共展示了AppendIterator::__construct方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 /**
  * Construct
  *
  * @param array $iterators
  */
 public function __construct(array $iterators)
 {
     parent::__construct();
     foreach ($iterators as $iterator) {
         $this->append($iterator);
     }
 }
开发者ID:xphere,项目名称:lazzzy,代码行数:12,代码来源:CompositeIterator.php

示例2: __construct

 /**
  * @param Reader[] $readers
  */
 public function __construct(array $readers = [])
 {
     parent::__construct();
     foreach ($readers as $reader) {
         $this->addReader($reader);
     }
 }
开发者ID:portphp,项目名称:portphp,代码行数:10,代码来源:AppendReader.php

示例3:

 /** @param xml object of class SimpleXmlStructure or XML file name to open.
  */
 function __construct($xml)
 {
     parent::__construct();
     $xml = is_object($xml) ? $xml : ($xml = simplexml_load_file($xml, 'SimpleXmlIterator'));
     $this->append($xml);
     $this->append($xml->attributes());
 }
开发者ID:browniebraun,项目名称:php-src,代码行数:9,代码来源:xml_tree.php

示例4: __construct

 /**
  * Iterator Constructor
  *
  * @param ElasticSource $source Datasource instance to be used to make subsequent requests to Elastic Search
  * @param array $options should contain 'total', 'limit', 'scrollId' and optionaly all other keys to be passed to
  * subsequent requests to Elastic Search
  * @return void
  **/
 public function __construct(ElasticSource $source, $options = array())
 {
     $this->_source = $source;
     $this->_total = $options['total'];
     $this->_pageSize = $options['limit'];
     $this->_scrollId = $options['scrollId'];
     $this->_totalPages = ceil($this->_total / $this->_pageSize);
     unset($options['limit'], $options['scrollId'], $options['total']);
     $this->_options = $options;
     parent::__construct();
 }
开发者ID:el-barto,项目名称:cakephp-elastic-search-datasource,代码行数:19,代码来源:ElasticScroll.php

示例5:

 function __construct($xml)
 {
     parent::__construct();
     if (!is_null($xml)) {
         $xml = is_object($xml) ? $xml : ($xml = simplexml_load_file($xml, 'SimpleXmlIterator'));
         $this->append($xml);
         $attr = $xml->attributes();
         if ($attr) {
             $this->append($attr);
         }
     }
 }
开发者ID:browniebraun,项目名称:php-src,代码行数:12,代码来源:xml_xpath_tree.php

示例6: __construct

 public function __construct()
 {
     parent::__construct();
     foreach (Yii::app()->getModules() as $id => $data) {
         $modelsDir = Yii::app()->getModule($id)->getBasePath() . '/models';
         if (!is_dir($modelsDir)) {
             continue;
         }
         $flags = FilesystemIterator::KEY_AS_PATHNAME | FilesystemIterator::CURRENT_AS_FILEINFO | FilesystemIterator::SKIP_DOTS;
         $this->append(new RecursiveDirectoryIterator($modelsDir, $flags));
         Yii::import($id . '.models.*');
     }
 }
开发者ID:blindest,项目名称:Yii-CMS-2.0,代码行数:13,代码来源:ModelInModuleFilesIterator.php

示例7:

 function parent__construct()
 {
     parent::__construct();
 }
开发者ID:zaky-92,项目名称:php-1,代码行数:4,代码来源:ext_spl_tests_iterator_031.php

示例8: __construct

 public function __construct(common_ext_Extension $extension)
 {
     parent::__construct();
     $this->addModelFiles($extension);
 }
开发者ID:nagyist,项目名称:generis,代码行数:5,代码来源:class.ExtensionModel.php

示例9: __construct

 /**
  * @param \Iterator $iterators
  */
 public function __construct(\Iterator $iterators)
 {
     parent::__construct();
     $this->iterators = $iterators;
     $iterators->rewind();
 }
开发者ID:indigophp,项目名称:iterators,代码行数:9,代码来源:LazyAppendIterator.php


注:本文中的AppendIterator::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。