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
getHistorySize()
публичный метод
getPage()
публичный метод
setHistorySize()
публичный метод
setPage()
публичный метод
public setPage ( TPage $page ) |
$page |
TPage |
|