PRADO Component Framework for PHP 5
  • Home
  • About
  • Testimonials
  • Demos
  • Download
  • Documentation
  • Forum
  • Development
  • Tutorials
  • Class Docs
  • API Manual
  • Wiki

Packages

  • None
  • System
    • Caching
    • Collections
    • Data
      • ActiveRecord
        • Relations
        • Scaffold
          • InputBuilder
      • Commom
        • Sqlite
      • Common
        • Mssql
        • Mysql
        • Oracle
        • Pgsql
        • Sqlite
      • DataGateway
      • SqlMap
        • Configuration
        • Statements
    • Exceptions
    • I18N
    • IO
    • Security
    • Util
    • Web
      • Javascripts
      • Services
      • UI
        • ActiveControls
        • WebControls
    • Xml
  • Wsat
    • pages
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo

Class TSessionPageStatePersister

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

<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

<pages>
  <page id="PageID" StatePersisterClass="System.Web.UI.TSessionPageStatePersister" />
</pages>
TComponent
Extended by TSessionPageStatePersister implements IPageStatePersister
Package: System\Web\UI
Copyright: Copyright © 2005-2014 PradoSoft
License: http://www.pradosoft.com/license/
Author: Qiang Xue <qiang.xue@gmail.com>
Since: 3.1
Located at Web/UI/TSessionPageStatePersister.php
Methods summary
public
# getPage( )

Implementation of

IPageStatePersister::getPage()
public
# setPage( TPage $page )

Parameters

$page
TPage
the page that this persister works for.

Implementation of

IPageStatePersister::setPage()
public integer
# getHistorySize( )

Returns

integer
maximum number of page states that should be kept in session. Defaults to 10.
public
# setHistorySize( integer $value )

Parameters

$value
integer
maximum number of page states that should be kept in session

Throws

TInvalidDataValueException
if the number is smaller than 1.
public
# save( mixed $state )

Saves state in session.

Saves state in session.

Parameters

$state
mixed
state to be stored

Implementation of

IPageStatePersister::save()
public mixed
# load( )

Loads page state from session.

Loads page state from session.

Returns

mixed
the restored state

Throws

THttpException
if page state is corrupted

Implementation of

IPageStatePersister::load()
Methods inherited from TComponent
__call(), __construct(), __destruct(), __get(), __isset(), __set(), __sleep(), __unset(), __wakeup(), addParsedObject(), asa(), attachBehavior(), attachBehaviors(), attachClassBehavior(), attachEventHandler(), canGetProperty(), canSetProperty(), clearBehaviors(), createdOnTemplate(), detachBehavior(), detachBehaviors(), detachClassBehavior(), detachEventHandler(), disableBehavior(), disableBehaviors(), enableBehavior(), enableBehaviors(), evaluateExpression(), evaluateStatements(), fxAttachClassBehavior(), fxDetachClassBehavior(), getAutoGlobalListen(), getBehaviorsEnabled(), getClassHierarchy(), getEventHandlers(), getListeningToGlobalEvents(), getSubProperty(), hasEvent(), hasEventHandler(), hasProperty(), isa(), listen(), raiseEvent(), setSubProperty(), unlisten()
Constants summary
string STATE_SESSION_KEY 'PRADO_SESSION_PAGESTATE'
#
string QUEUE_SESSION_KEY 'PRADO_SESSION_STATEQUEUE'
#
Constants inherited from TComponent
GLOBAL_RAISE_EVENT_LISTENER
Terms of Service | Contact Us
PRADO v3.2.4 API Manual API documentation generated by ApiGen 2.8.0
Copyright © 2006-2014 by the PRADO Group.
Powered by PRADO