You are here

public function History::forward in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/browser-kit/History.php \Symfony\Component\BrowserKit\History::forward()

Goes forward in the history.

Return value

Request A Request instance

Throws

\LogicException if the stack is already on the last page

File

vendor/symfony/browser-kit/History.php, line 78

Class

History
History.

Namespace

Symfony\Component\BrowserKit

Code

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];
}