PHP Class Prado\Web\UI\TSessionPageStatePersister

TSessionPageStatePersister implements a page state persistent method based on sessions. Page state are stored in user sessions and therefore, this persister requires session to be started and available. TSessionPageStatePersister keeps limited number of history states in session, mainly to preserve the precious server storage. The number is specified by {@link setHistorySize HistorySize}, which defaults to 10. There are a couple of ways to use TSessionPageStatePersister. One can override the page's {@link TPage::getStatePersister()} method and create a TSessionPageStatePersister instance there. Or one can configure the pages to use TSessionPageStatePersister in page configurations as follows, The above configuration will affect the pages under the directory containing this configuration and all its subdirectories. To configure individual pages to use TSessionPageStatePersister, use
Since: 3.1
Author: Qiang Xue ([email protected])
Inheritance: extends Prado\TComponent, implements Prado\Web\UI\IPageStatePersister
Afficher le fichier Open project: pradosoft/prado

Méthodes publiques

Méthode Description
getHistorySize ( ) : integer
getPage ( )
load ( ) : mixed Loads page state from session.
save ( $state ) Saves state in session.
setHistorySize ( $value )
setPage ( TPage $page )

Method Details

getHistorySize() public méthode

public getHistorySize ( ) : integer
Résultat integer maximum number of page states that should be kept in session. Defaults to 10.

getPage() public méthode

public getPage ( )

load() public méthode

Loads page state from session.
public load ( ) : mixed
Résultat mixed the restored state

save() public méthode

Saves state in session.
public save ( $state )

setHistorySize() public méthode

public setHistorySize ( $value )

setPage() public méthode

public setPage ( TPage $page )
$page TPage