<?php
/**
 * Zend Framework
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://framework.zend.com/license/new-bsd
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@zend.com so we can send you a copy immediately.
 *
 * @category   Zend
 * @package    Zend_Stdlib
 * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 */

/**
 * @namespace
 */
namespace Zend\Stdlib;

use ArrayIterator,
    ArrayObject;

/**
 * ArrayObject that acts as a stack with regards to iteration
 *
 * @category   Zend
 * @package    Zend_Stdlib
 * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 */
class ArrayStack extends ArrayObject
{
    /**
     * 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));
    }
}

Bring milestones/exceptions up-to-date with zf2/master
Bring milestones/exceptions up-to-date with zf2/master

Merge branch 'zf2/master' into milestones/exceptions

Conflicts:
	library/Zend/Amf/Parser/TypeLoader.php
	library/Zend/Amf/Server.php
	library/Zend/Application/AbstractBootstrap.php
	library/Zend/File/Transfer/Adapter/AbstractAdapter.php
	library/Zend/Filter/Inflector.php
	library/Zend/Filter/InputFilter.php
	library/Zend/Filter/StaticFilter.php
	library/Zend/Form/Element.php
	library/Zend/Form/Element/File.php
	library/Zend/InfoCard/XML/Security/Transform/Exception.php
	library/Zend/Navigation/Page/Mvc.php
	library/Zend/Paginator/Paginator.php
	library/Zend/Search/Lucene/Document/Exception.php
	library/Zend/Serializer/Adapter/Amf0.php
	library/Zend/Serializer/Adapter/Amf3.php
	library/Zend/Serializer/Exception.php
	library/Zend/Serializer/Serializer.php
	library/Zend/Service/Amazon/Ec2/AbstractService.php
	library/Zend/Tag/Cloud.php
	library/Zend/Tag/Cloud/Decorator/Exception.php
	library/Zend/Tag/Cloud/Decorator/HtmlTag.php
	library/Zend/Test/PHPUnit/ControllerTestCase.php
	library/Zend/Validator/StaticValidator.php
	library/Zend/Wildfire/Protocol/Exception.php
	library/Zend/Wildfire/Protocol/Exception/InvalidArgumentException.php
	tests/Zend/Application/AbstractBootstrapTest.php
	tests/Zend/Filter/InputTest.php
	tests/Zend/Filter/StaticFilterTest.php
	tests/Zend/Form/ElementTest.php
	tests/Zend/Form/FormTest.php
	tests/Zend/Paginator/PaginatorTest.php
	tests/Zend/Serializer/SerializerTest.php
	tests/Zend/Tag/Cloud/CloudTest.php
	tests/Zend/Tag/Cloud/Decorator/HtmlTagTest.php
	tests/Zend/Translate/Adapter/XmlTmTest.php
