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
  • None
  • system
    • base
    • caching
    • console
    • db
      • ar
      • schema
    • validators
    • web
      • actions
      • auth
      • helpers
      • widgets
        • captcha
        • pagers
  • zii
    • widgets
      • grid

Classes

  • BaseDocsMassAction
  • CommonFieldsBehavior
  • Expression
  • MassAction
  • MassAddToList
  • MassCompleteAction
  • MassMoveFileSysObjToFolder
  • MassRemoveFromList
  • MassRenameFileSysObj
  • MassUncompleteAction
  • MobileRecentItems
  • ModulePanelItem
  • NewListFromSelection
  • PanelItem
  • QuickCRUDBehavior
  • RecentItemPanelItem
  • ServiceRoutingBehavior
  • SettingsPanelItem
  • X2AddressBehavior
  • X2AuthCache
  • X2BaseListViewBehavior

Exceptions

  • TwitterFeedWidgetException
  • Overview
  • Package
  • Class
  • Tree

Class X2AuthCache

CApplicationComponent is the base class for application component classes.

CApplicationComponent implements the basic methods required by IApplicationComponent.

When developing an application component, try to put application component initialization code in the X2AuthCache::init() method instead of the constructor. This has the advantage that the application component can be customized through application configuration.

CComponent
Extended by CApplicationComponent implements IApplicationComponent
Extended by X2AuthCache
Package: system\base
Author: Qiang Xue <qiang.xue@gmail.com>
Since: 1.0
Located at x2engine/protected/components/X2AuthCache.php
Methods summary
public
# init( )

Initializes this application component. Trimmed down version of CDbCache::init.

Initializes this application component. Trimmed down version of CDbCache::init.

Overrides

CApplicationComponent::init()
public array
# loadAuthCache( integer $userId = null )

Looks up all the auth results for the specified user ID.

Looks up all the auth results for the specified user ID.

Parameters

$userId
integer
$userId the user ID, defaults to current user

Returns

array
associative array of authItem names and boolean permission values
public
# addResult( mixed $userId, mixed $authItem, mixed $value, mixed $cacheParams = array() )
public CDbConnection
# getDbConnection( )

Returns

CDbConnection
the DB connection instance

Throws

CException
if X2AuthCache::$connectionID does not point to a valid application component.
protected
# gc( )

Removes the expired data values.

Removes the expired data values.

public boolean
# clear( )

Deletes all values from cache.

Deletes all values from cache.

Returns

boolean
whether the flush operation was successful.
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()
Properties summary
public string $connectionID
#

the ID of the CDbConnection application component.

the ID of the CDbConnection application component.

public string $tableName 'x2_auth_cache'
#

the name of the auth cache table.

the name of the auth cache table.

public integer $gcProbability 100
#

how often to garbage collect (delete expired values). GC is performed using an N-sided coin flip

how often to garbage collect (delete expired values). GC is performed using an N-sided coin flip

Properties inherited from CApplicationComponent
$behaviors
Magic properties inherited from CApplicationComponent
$isInitialized
X2CRM Documentation API documentation generated by ApiGen 2.8.0