コード例 #1
0
 /**
  * @return \Generator
  */
 public function getIterator() : \Generator
 {
     if ($this->needResort) {
         uasort($this->keys, function ($a, $b) {
             return $this->comparator->compare($a, $b);
         });
         $this->needResort = false;
     }
     yield from parent::getIterator();
 }