W3cubDocs

/Symfony 2.7

Symfony\Component\BrowserKit\History

class History

History.

Methods

clear()

Clears the history.

add(Request $request)

Adds a Request to the history.

bool isEmpty()

Returns true if the history is empty.

Request back()

Goes back in the history.

Request forward()

Goes forward in the history.

Request current()

Returns the current element in the history.

Details

public clear()

Clears the history.

public add(Request $request)

Adds a Request to the history.

Parameters

Request $request A Request instance

public bool isEmpty()

Returns true if the history is empty.

Return Value

bool true if the history is empty, false otherwise

public Request back()

Goes back in the history.

Return Value

Request A Request instance

Exceptions

LogicException if the stack is already on the first page

public Request forward()

Goes forward in the history.

Return Value

Request A Request instance

Exceptions

LogicException if the stack is already on the last page

public Request current()

Returns the current element in the history.

Return Value

Request A Request instance

Exceptions

LogicException if the stack is empty

© 2004–2016 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/2.7/Symfony/Component/BrowserKit/History.html