コード例 #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();
 }
コード例 #2
0
 /**
  * @param $key
  * @return bool
  */
 public function hasValue($key) : bool
 {
     $key = $this->valueFactory->resolve($key);
     return parent::hasValue($key);
 }