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>

  • author: Qiang Xue <qiang.xue@gmail.com>
  • version: $Id: TSessionPageStatePersister.php 2996 2011-06-20 15:24:57Z ctrlaltca@gmail.com $
  • since: 3.1

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

Implementation of:
IPageStatePersister::getPage()
load (line 118)

Loads page state from session.

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

Implementation of:
IPageStatePersister::load()
Loads page state from persistent storage
save (line 93)

Saves state in session.

  • access: public
void save (mixed $state)
  • mixed $state: state to be stored

Implementation of:
IPageStatePersister::save()
Saves state to persistent storage.
setHistorySize (line 82)
  • throws: TInvalidDataValueException if the number is smaller than 1.
  • access: public
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.

Implementation of:
IPageStatePersister::setPage()

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::__call()
TComponent::__get()
TComponent::__set()
TComponent::__sleep()
TComponent::__wakeup()
Class Constants
QUEUE_SESSION_KEY = 'PRADO_SESSION_STATEQUEUE' (line 49)
STATE_SESSION_KEY = 'PRADO_SESSION_PAGESTATE' (line 48)

Documentation generated on Mon, 25 Jun 2012 14:39:11 +0200 by phpDocumentor 1.4.3