Esempio n. 1
0
 /**
  * @return \Generator
  */
 public function getIterator() : \Generator
 {
     if ($this->needResort) {
         uasort($this->items, function ($a, $b) {
             return $this->comparator->compare($a, $b);
         });
         $this->needResort = false;
     }
     yield from parent::getIterator();
 }
Esempio n. 2
0
 /**
  * FactorySet constructor.
  * @param array $items
  */
 public function __construct(array $items = [])
 {
     $this->factory = new Factory();
     parent::__construct($items);
 }