本文整理汇总了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);
}
}
示例2: __construct
/**
* @param Reader[] $readers
*/
public function __construct(array $readers = [])
{
parent::__construct();
foreach ($readers as $reader) {
$this->addReader($reader);
}
}
示例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());
}
示例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();
}
示例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);
}
}
}
示例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.*');
}
}
示例7:
function parent__construct()
{
parent::__construct();
}
示例8: __construct
public function __construct(common_ext_Extension $extension)
{
parent::__construct();
$this->addModelFiles($extension);
}
示例9: __construct
/**
* @param \Iterator $iterators
*/
public function __construct(\Iterator $iterators)
{
parent::__construct();
$this->iterators = $iterators;
$iterators->rewind();
}