Author: Elliot Levin (elliotlevin@hotmail.com)
示例#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;
 }
示例#2
0
 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);
 }
示例#3
0
 protected final function __constructIterator(callable $filter)
 {
     $this->filter = Functions::allowExcessiveArguments($filter);
 }