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

  • CFilter
  • CFilterChain
  • CHttpCacheFilter
  • CInlineFilter
  • Overview
  • Package
  • Class
  • Tree

Class CFilter

CFilter is the base class for all filters.

A filter can be applied before and after an action is executed. It can modify the context that the action is to run or decorate the result that the action generates.

Override CFilter::preFilter() to specify the filtering logic that should be applied before the action, and CFilter::postFilter() for filtering logic after the action.

CComponent
Extended by CFilter implements IFilter

Direct known subclasses

CAccessControlFilter, CHttpCacheFilter, CInlineFilter, FileUploadsFilter, X2AjaxHandlerFilter
Package: system\web\filters
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/filters/CFilter.php
Methods summary
public
# filter( CFilterChain $filterChain )

Performs the filtering. The default implementation is to invoke CFilter::preFilter() and CFilter::postFilter() which are meant to be overridden child classes. If a child class needs to override this method, make sure it calls <span class="php-var">$filterChain</span>->run() if the action should be executed.

Performs the filtering. The default implementation is to invoke CFilter::preFilter() and CFilter::postFilter() which are meant to be overridden child classes. If a child class needs to override this method, make sure it calls <span class="php-var">$filterChain</span>->run() if the action should be executed.

Parameters

$filterChain
CFilterChain
$filterChain the filter chain that the filter is on.

Implementation of

IFilter::filter()
public
# init( )

Initializes the filter. This method is invoked after the filter properties are initialized and before CFilter::preFilter() is called. You may override this method to include some initialization logic.

Initializes the filter. This method is invoked after the filter properties are initialized and before CFilter::preFilter() is called. You may override this method to include some initialization logic.

Since

1.1.4
protected boolean
# preFilter( CFilterChain $filterChain )

Performs the pre-action filtering.

Performs the pre-action filtering.

Parameters

$filterChain
CFilterChain
$filterChain the filter chain that the filter is on.

Returns

boolean
whether the filtering process should continue and the action should be executed.
protected
# postFilter( CFilterChain $filterChain )

Performs the post-action filtering.

Performs the post-action filtering.

Parameters

$filterChain
CFilterChain
$filterChain the filter chain that the filter is on.
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()
API documentation generated by ApiGen 2.8.0