Pinq\Iterators\Standard\IIterator::fetch PHP 메소드

fetch() 공개 메소드

If the current position is valid, returns an array with index zero as the key and index one as the value and advances the iterator to the next position or returns null if the current position is invalid.
public fetch ( ) : array | null
리턴 array | null The element array or null if invalid position
    public function fetch();

Usage Example

예제 #1
0
 protected function doFetch()
 {
     while ((list($innerKey, $innerValue) = $this->innerValuesIterator->fetch()) === null) {
         if ((list($this->outerKey, $this->outerValue) = $this->outerIterator->fetch()) === null) {
             return null;
         }
         $this->innerValuesIterator = $this->getInnerValuesIterator($this->outerKey, $this->outerValue);
         $this->innerValuesIterator->rewind();
     }
     $projectionFunction = $this->projectionFunction;
     return [$this->count++, $projectionFunction($this->outerValue, $innerValue, $this->outerKey, $innerKey)];
 }
All Usage Examples Of Pinq\Iterators\Standard\IIterator::fetch
IIterator