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

Class CConsoleCommandRunner

CConsoleCommandRunner manages commands and executes the requested command.

CComponent
Extended by CConsoleCommandRunner
Package: system\console
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/console/CConsoleCommandRunner.php
Methods summary
public integer|null
# run( array $args )

Executes the requested command.

Executes the requested command.

Parameters

$args
array
$args list of user supplied parameters (including the entry script name and the command name).

Returns

integer|null
application exit code returned by the command. if null is returned, application will not exit explicitly. See also CConsoleApplication::processRequest(). (return value is available since version 1.1.11)
public string
# getScriptName( )

Returns

string
the entry script name
public CConsoleCommand|null
# getCommand( )

Returns the currently running command.

Returns the currently running command.

Returns

CConsoleCommand|null
the currently active command.

Since

1.1.14
public
# setCommand( CConsoleCommand $value )

Parameters

$value
CConsoleCommand
$value the currently active command.

Since

1.1.14
public array
# findCommands( string $path )

Searches for commands under the specified directory.

Searches for commands under the specified directory.

Parameters

$path
string
$path the directory containing the command class files.

Returns

array
list of commands (command name=>command class file)
public
# addCommands( string $path )

Adds commands from the specified command path. If a command already exists, the new one will be ignored.

Adds commands from the specified command path. If a command already exists, the new one will be ignored.

Parameters

$path
string
$path the alias of the directory containing the command class files.
public CConsoleCommand
# createCommand( string $name )

Parameters

$name
string
$name command name (case-insensitive)

Returns

CConsoleCommand
the command object. Null if the name is invalid.
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 array $commands array()
#

list of all available commands (command name=>command configuration). Each command configuration can be either a string or an array. If the former, the string should be the class name or YiiBase::getPathOfAlias class path alias of the command. If the latter, the array must contain a 'class' element which specifies the command's class name or YiiBase::getPathOfAlias class path alias. The rest name-value pairs in the array are used to initialize the corresponding command properties. For example,

array(
  'email'=>array(
     'class'=>'path.to.Mailer',
     'interval'=>3600,
  ),
  'log'=>'path.to.LoggerCommand',
)

list of all available commands (command name=>command configuration). Each command configuration can be either a string or an array. If the former, the string should be the class name or YiiBase::getPathOfAlias class path alias of the command. If the latter, the array must contain a 'class' element which specifies the command's class name or YiiBase::getPathOfAlias class path alias. The rest name-value pairs in the array are used to initialize the corresponding command properties. For example,

array(
  'email'=>array(
     'class'=>'path.to.Mailer',
     'interval'=>3600,
  ),
  'log'=>'path.to.LoggerCommand',
)
Magic properties summary
public string $scriptName
#

The entry script name.

The entry script name.

public CConsoleCommand $command
#

The currently active command.

The currently active command.

API documentation generated by ApiGen 2.8.0