You are here

public function History::current in Zircon Profile 8.0

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

Returns the current element in the history.

Return value

Request A Request instance

Throws

\LogicException if the stack is empty

File

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

Class

History
History.

Namespace

Symfony\Component\BrowserKit

Code

public function current() {
  if (-1 == $this->position) {
    throw new \LogicException('The page history is empty.');
  }
  return clone $this->stack[$this->position];
}