You are here

class ArrayStack in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/zendframework/zend-stdlib/src/ArrayStack.php \Zend\Stdlib\ArrayStack

ArrayObject that acts as a stack with regards to iteration

Hierarchy

  • class \Zend\Stdlib\ArrayStack extends \ArrayObject

Expanded class hierarchy of ArrayStack

File

vendor/zendframework/zend-stdlib/src/ArrayStack.php, line 18

Namespace

Zend\Stdlib
View source
class ArrayStack extends PhpArrayObject {

  /**
   * Retrieve iterator
   *
   * Retrieve an array copy of the object, reverse its order, and return an
   * ArrayIterator with that reversed array.
   *
   * @return ArrayIterator
   */
  public function getIterator() {
    $array = $this
      ->getArrayCopy();
    return new ArrayIterator(array_reverse($array));
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ArrayStack::getIterator public function Retrieve iterator