Class TSessionPageStatePersister

Description

Implements interfaces:

TSessionPageStatePersister class

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 HistorySize, 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,

  1. <pages StatePersisterClass="System.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
  1. <pages>
  2. <page id="PageID" StatePersisterClass="System.Web.UI.TSessionPageStatePersister" />
  3. </pages>

  • since: 3.1
  • version: $Id: TSessionPageStatePersister.php 2228 2007-09-17 18:18:17Z xue $
  • author: Qiang Xue <qiang.xue@gmail.com>

Located in /Web/UI/TSessionPageStatePersister.php (line 46)

TComponent
   |
   --TSessionPageStatePersister
Class Constant Summary
 QUEUE_SESSION_KEY = 'PRADO_SESSION_STATEQUEUE'
 STATE_SESSION_KEY = 'PRADO_SESSION_PAGESTATE'
Method Summary
integer getHistorySize ()
void getPage (TPage 0)
mixed load ()
void save (mixed $state)
void setHistorySize (integer $value)
void setPage (TPage $page)
Methods
getHistorySize (line 73)
  • return: maximum number of page states that should be kept in session. Defaults to 10.
  • access: public
integer getHistorySize ()
getPage (line 57)
  • access: public
void getPage (TPage 0)
  • TPage 0: the page that this persister works for
load (line 118)

Loads page state from session.

  • return: the restored state
  • access: public
  • throws: THttpException if page state is corrupted
mixed load ()
save (line 93)

Saves state in session.

  • access: public
void save (mixed $state)
  • mixed $state: state to be stored
setHistorySize (line 82)
  • access: public
  • throws: TInvalidDataValueException if the number is smaller than 1.
void setHistorySize (integer $value)
  • integer $value: maximum number of page states that should be kept in session
setPage (line 65)
  • access: public
void setPage (TPage $page)
  • TPage $page: the page that this persister works for.

Inherited Methods

Inherited From TComponent

TComponent::addParsedObject()
TComponent::attachEventHandler()
TComponent::canGetProperty()
TComponent::canSetProperty()
TComponent::createdOnTemplate()
TComponent::detachEventHandler()
TComponent::evaluateExpression()
TComponent::evaluateStatements()
TComponent::getEventHandlers()
TComponent::getSubProperty()
TComponent::hasEvent()
TComponent::hasEventHandler()
TComponent::hasProperty()
TComponent::raiseEvent()
TComponent::setSubProperty()
TComponent::__get()
TComponent::__set()
Class Constants
QUEUE_SESSION_KEY = 'PRADO_SESSION_STATEQUEUE' (line 49)
STATE_SESSION_KEY = 'PRADO_SESSION_PAGESTATE' (line 48)

Documentation generated on Mon, 21 Apr 2008 11:36:11 -0400 by phpDocumentor 1.3.0RC4