示例#1
0
 /**
  * Construct
  *
  * @param array $iterators
  */
 public function __construct(array $iterators)
 {
     parent::__construct();
     foreach ($iterators as $iterator) {
         $this->append($iterator);
     }
 }
示例#2
0
 /**
  * @param Reader[] $readers
  */
 public function __construct(array $readers = [])
 {
     parent::__construct();
     foreach ($readers as $reader) {
         $this->addReader($reader);
     }
 }
示例#3
0
 /** @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());
 }
 /**
  * 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
0
 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);
         }
     }
 }
 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.*');
     }
 }
 function parent__construct()
 {
     parent::__construct();
 }
示例#8
0
 public function __construct(common_ext_Extension $extension)
 {
     parent::__construct();
     $this->addModelFiles($extension);
 }
 /**
  * @param \Iterator $iterators
  */
 public function __construct(\Iterator $iterators)
 {
     parent::__construct();
     $this->iterators = $iterators;
     $iterators->rewind();
 }