Author: Elliot Levin (elliotlevin@hotmail.com)
Exemple #1
0
 /**
  * @param callable $orderByFunction
  * @param boolean  $isAscending
  *
  * @return IOrderedIterator
  */
 public final function thenOrderBy(callable $orderByFunction, $isAscending)
 {
     $newOrderedIterator = new self($this->getSourceIterator(), function () {
     }, true);
     $newOrderedIterator->orderByFunctions = $this->orderByFunctions;
     $newOrderedIterator->isAscendingArray = $this->isAscendingArray;
     $newOrderedIterator->orderByFunctions[] = Functions::allowExcessiveArguments($orderByFunction);
     $newOrderedIterator->isAscendingArray[] = $isAscending;
     return $newOrderedIterator;
 }
 protected function __constructIterator(callable $keyProjectionFunction = null, callable $valueProjectionFunction = null)
 {
     $this->keyProjectionFunction = $keyProjectionFunction === null ? null : Functions::allowExcessiveArguments($keyProjectionFunction);
     $this->valueProjectionFunction = $valueProjectionFunction === null ? null : Functions::allowExcessiveArguments($valueProjectionFunction);
 }
Exemple #3
0
 protected final function __constructIterator(callable $filter)
 {
     $this->filter = Functions::allowExcessiveArguments($filter);
 }