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 \Prado\Web\UI\setHistorySize, which defaults to 10.
There are a couple of ways to use TSessionPageStatePersister. One can override the page's TPage::getStatePersister() method and create a TSessionPageStatePersister instance there. Or one can configure the pages to use TSessionPageStatePersister in page configurations as follows,
<pages StatePersisterClass="Prado\Web\UI\TSessionPageStatePersister" />
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
<pages>
<page id="PageID" StatePersisterClass="Prado\Web\UI\TSessionPageStatePersister" />
</pages>
Class hierarchy
Author: Qiang Xue <qiang.xue@gmail.com>Since: 3.1
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
public
mixed
|
QUEUE_SESSION_KEY
|
'PRADO_SESSION_STATEQUEUE'
|
public
mixed
|
STATE_SESSION_KEY
|
'PRADO_SESSION_PAGESTATE'
|
\Prado\TComponent::GLOBAL_RAISE_EVENT_LISTENER |