$51 GRAYBYTE WORDPRESS FILE MANAGER $96

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 172.67.217.254 | ADMIN IP 216.73.216.180
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : mail

/opt/alt/php54/usr/share/pear/Symfony/Component/BrowserKit/

HOME
Current File : /opt/alt/php54/usr/share/pear/Symfony/Component/BrowserKit//History.php
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <[email protected]>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\BrowserKit;

/**
 * History.
 *
 * @author Fabien Potencier <[email protected]>
 */
class History
{
    protected $stack = array();
    protected $position = -1;

    /**
     * Clears the history.
     */
    public function clear()
    {
        $this->stack = array();
        $this->position = -1;
    }

    /**
     * Adds a Request to the history.
     *
     * @param Request $request A Request instance
     */
    public function add(Request $request)
    {
        $this->stack = array_slice($this->stack, 0, $this->position + 1);
        $this->stack[] = clone $request;
        $this->position = count($this->stack) - 1;
    }

    /**
     * Returns true if the history is empty.
     *
     * @return Boolean true if the history is empty, false otherwise
     */
    public function isEmpty()
    {
        return count($this->stack) == 0;
    }

    /**
     * Goes back in the history.
     *
     * @return Request A Request instance
     *
     * @throws \LogicException if the stack is already on the first page
     */
    public function back()
    {
        if ($this->position < 1) {
            throw new \LogicException('You are already on the first page.');
        }

        return clone $this->stack[--$this->position];
    }

    /**
     * Goes forward in the history.
     *
     * @return Request A Request instance
     *
     * @throws \LogicException if the stack is already on the last page
     */
    public function forward()
    {
        if ($this->position > count($this->stack) - 2) {
            throw new \LogicException('You are already on the last page.');
        }

        return clone $this->stack[++$this->position];
    }

    /**
     * Returns the current element in the history.
     *
     * @return Request A Request instance
     *
     * @throws \LogicException if the stack is empty
     */
    public function current()
    {
        if (-1 == $this->position) {
            throw new \LogicException('The page history is empty.');
        }

        return clone $this->stack[$this->position];
    }
}


Current_dir [ NOT WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
3 Mar 2024 10.54 PM
root / root
0755
Client.php
16.777 KB
18 Dec 2019 11.22 AM
root / root
0644
Cookie.php
8.519 KB
18 Dec 2019 11.22 AM
root / root
0644
CookieJar.php
7.403 KB
18 Dec 2019 11.22 AM
root / root
0644
History.php
2.279 KB
18 Dec 2019 11.22 AM
root / root
0644
Request.php
2.737 KB
18 Dec 2019 11.22 AM
root / root
0644
Response.php
3.294 KB
18 Dec 2019 11.22 AM
root / root
0644
autoloader.php
0.332 KB
18 Dec 2019 11.22 AM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF