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

  • CConsoleApplication
  • CConsoleCommand
  • CConsoleCommandBehavior
  • CConsoleCommandEvent
  • CConsoleCommandRunner
  • CHelpCommand
  • ThemeBuildCommand
  • Overview
  • Package
  • Class
  • Tree
 1: <?php
 2: /**
 3:  * CConsoleCommandBehavior class file.
 4:  *
 5:  * @author Evgeny Blinov <e.a.blinov@gmail.com>
 6:  * @link http://www.yiiframework.com/
 7:  * @copyright 2008-2013 Yii Software LLC
 8:  * @license http://www.yiiframework.com/license/
 9:  */
10: 
11: /**
12:  * CConsoleCommandBehavior is a base class for behaviors that are attached to a console command component.
13:  *
14:  * @property CConsoleCommand $owner The owner model that this behavior is attached to.
15:  *
16:  * @author Evgeny Blinov <e.a.blinov@gmail.com>
17:  * @package system.console
18:  * @since 1.1.11
19:  */
20: class CConsoleCommandBehavior extends CBehavior
21: {
22:     /**
23:      * Declares events and the corresponding event handler methods.
24:      * The default implementation returns 'onAfterConstruct', 'onBeforeValidate' and 'onAfterValidate' events and handlers.
25:      * If you override this method, make sure you merge the parent result to the return value.
26:      * @return array events (array keys) and the corresponding event handler methods (array values).
27:      * @see CBehavior::events
28:      */
29:     public function events()
30:     {
31:         return array(
32:             'onBeforeAction' => 'beforeAction',
33:             'onAfterAction' => 'afterAction'
34:         );
35:     }
36:     /**
37:      * Responds to {@link CConsoleCommand::onBeforeAction} event.
38:      * Override this method and make it public if you want to handle the corresponding event of the {@link CBehavior::owner owner}.
39:      * @param CConsoleCommandEvent $event event parameter
40:      */
41:     protected function beforeAction($event)
42:     {
43:     }
44: 
45:     /**
46:      * Responds to {@link CConsoleCommand::onAfterAction} event.
47:      * Override this method and make it public if you want to handle the corresponding event of the {@link CBehavior::owner owner}.
48:      * @param CConsoleCommandEvent $event event parameter
49:      */
50:     protected function afterAction($event)
51:     {
52:     }
53: }
API documentation generated by ApiGen 2.8.0