/** * @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); }
protected final function __constructIterator(callable $filter) { $this->filter = Functions::allowExcessiveArguments($filter); }