Overview

Packages

  • application
    • commands
    • components
      • actions
      • filters
      • leftWidget
      • permissions
      • sortableWidget
      • util
      • webupdater
      • x2flow
        • actions
        • triggers
      • X2GridView
      • X2Settings
    • controllers
    • models
      • embedded
    • modules
      • accounts
        • controllers
        • models
      • actions
        • controllers
        • models
      • calendar
        • controllers
        • models
      • charts
        • models
      • contacts
        • controllers
        • models
      • docs
        • components
        • controllers
        • models
      • groups
        • controllers
        • models
      • marketing
        • components
        • controllers
        • models
      • media
        • controllers
        • models
      • mobile
        • components
      • opportunities
        • controllers
        • models
      • products
        • controllers
        • models
      • quotes
        • controllers
        • models
      • services
        • controllers
        • models
      • template
        • models
      • users
        • controllers
        • models
      • workflow
        • controllers
        • models
      • x2Leads
        • controllers
        • models
  • Net
  • None
  • PHP
  • system
    • base
    • caching
      • dependencies
    • collections
    • console
    • db
      • ar
      • schema
        • cubrid
        • mssql
        • mysql
        • oci
        • pgsql
        • sqlite
    • i18n
      • gettext
    • logging
    • test
    • utils
    • validators
    • web
      • actions
      • auth
      • filters
      • form
      • helpers
      • renderers
      • services
      • widgets
        • captcha
        • pagers
  • Text
    • Highlighter
  • zii
    • behaviors
    • widgets
      • grid
      • jui

Classes

  • ActionFormModelBase
  • CActiveDataProvider
  • CalendarEventFormModel
  • CallFormModel
  • CArrayDataProvider
  • CAssetManager
  • CBaseController
  • CBaseUrlRule
  • CCacheHttpSession
  • CClientScript
  • CController
  • CCookieCollection
  • CDataProvider
  • CDataProviderIterator
  • CDbHttpSession
  • CExtController
  • CFormModel
  • CHttpCookie
  • CHttpRequest
  • CHttpSession
  • CHttpSessionIterator
  • COutputEvent
  • CPagination
  • CreatePageFormModel
  • CSort
  • CSqlDataProvider
  • CTheme
  • CThemeManager
  • CUploadedFile
  • CUrlManager
  • CUrlRule
  • CWebApplication
  • CWebModule
  • CWidgetFactory
  • EditMobileFormsFormModel
  • EventCommentPublisherFormModel
  • EventFormModel
  • EventPublisherFormModel
  • FileSystemObjectDataProvider
  • MassActionFormModel
  • MobilePagination
  • NoteFormModel
  • NotificationsController
  • TimeFormModel
  • UploadLogoFormModel
  • X2FormModel
  • X2HttpRequest

Interfaces

  • IDataProvider
  • IWidgetFactory
  • Overview
  • Package
  • Class
  • Tree

Class CCacheHttpSession

CCacheHttpSession implements a session component using cache as storage medium.

The cache being used can be any cache application component implementing ICache interface. The ID of the cache application component is specified via CCacheHttpSession::$cacheID, which defaults to 'cache'.

Beware, by definition cache storage are volatile, which means the data stored on them may be swapped out and get lost. Therefore, you must make sure the cache used by this component is NOT volatile. If you want to use CDbCache as storage medium, use CDbHttpSession is a better choice.

CComponent
Extended by CApplicationComponent implements IApplicationComponent
Extended by CHttpSession implements IteratorAggregate, ArrayAccess, Countable
Extended by CCacheHttpSession
Package: system\web
Copyright: 2008-2013 Yii Software LLC
License: http://www.yiiframework.com/license/
Author: Qiang Xue <qiang.xue@gmail.com>
Since: 1.0
Located at x2engine/framework/web/CCacheHttpSession.php
Methods summary
public
# init( )

Initializes the application component. This method overrides the parent implementation by checking if cache is available.

Initializes the application component. This method overrides the parent implementation by checking if cache is available.

Overrides

CHttpSession::init()
public boolean
# getUseCustomStorage( )

Returns a value indicating whether to use custom session storage. This method overrides the parent implementation and always returns true.

Returns a value indicating whether to use custom session storage. This method overrides the parent implementation and always returns true.

Returns

boolean
whether to use custom storage.

Overrides

CHttpSession::getUseCustomStorage()
public string
# readSession( string $id )

Session read handler. Do not call this method directly.

Session read handler. Do not call this method directly.

Parameters

$id
string
$id session ID

Returns

string
the session data

Overrides

CHttpSession::readSession()
public boolean
# writeSession( string $id, string $data )

Session write handler. Do not call this method directly.

Session write handler. Do not call this method directly.

Parameters

$id
string
$id session ID
$data
string
$data session data

Returns

boolean
whether session write is successful

Overrides

CHttpSession::writeSession()
public boolean
# destroySession( string $id )

Session destroy handler. Do not call this method directly.

Session destroy handler. Do not call this method directly.

Parameters

$id
string
$id session ID

Returns

boolean
whether session is destroyed successfully

Overrides

CHttpSession::destroySession()
protected string
# calculateKey( string $id )

Generates a unique key used for storing session data in cache.

Generates a unique key used for storing session data in cache.

Parameters

$id
string
$id session variable name

Returns

string
a safe cache key associated with the session variable name
Methods inherited from CHttpSession
add(), clear(), close(), closeSession(), contains(), count(), destroy(), gcSession(), get(), getCookieMode(), getCookieParams(), getCount(), getGCProbability(), getIsStarted(), getIterator(), getKeys(), getSavePath(), getSessionID(), getSessionName(), getTimeout(), getUseTransparentSessionID(), itemAt(), offsetExists(), offsetGet(), offsetSet(), offsetUnset(), open(), openSession(), regenerateID(), remove(), setCookieMode(), setCookieParams(), setGCProbability(), setSavePath(), setSessionID(), setSessionName(), setTimeout(), setUseTransparentSessionID(), toArray()
Methods inherited from CApplicationComponent
getIsInitialized()
Methods inherited from CComponent
__call(), __get(), __isset(), __set(), __unset(), asa(), attachBehavior(), attachBehaviors(), attachEventHandler(), canGetProperty(), canSetProperty(), detachBehavior(), detachBehaviors(), detachEventHandler(), disableBehavior(), disableBehaviors(), enableBehavior(), enableBehaviors(), evaluateExpression(), getEventHandlers(), hasEvent(), hasEventHandler(), hasProperty(), raiseEvent()
Constants summary
string CACHE_KEY_PREFIX 'Yii.CCacheHttpSession.'
#

Prefix to the keys for storing cached data

Prefix to the keys for storing cached data

Properties summary
public string $cacheID 'cache'
#

the ID of the cache application component. Defaults to 'cache' (the primary cache application component.)

the ID of the cache application component. Defaults to 'cache' (the primary cache application component.)

Properties inherited from CHttpSession
$autoStart
Properties inherited from CApplicationComponent
$behaviors
Magic properties summary
public boolean $useCustomStorage
#

Whether to use custom storage.

Whether to use custom storage.

Magic properties inherited from CHttpSession
$cookieMode, $cookieParams, $count, $gCProbability, $isStarted, $iterator, $keys, $savePath, $sessionID, $sessionName, $timeout, $useTransparentSessionID
Magic properties inherited from CApplicationComponent
$isInitialized
API documentation generated by ApiGen 2.8.0