Arbit - project tracking

Arbit - project tracking

API documentation :: Docs For Class arbitFrameworkCliTool

Core::arbitFrameworkCliTool

Class arbitFrameworkCliTool

Base class for CLI tools, implementing the basic options and out handling

Base class for CLI tools, implementing the basic options and out handling

Author(s):
Version:   $Revision: 1684 $
License:   GPL

Descendants

Child Class Description
arbitFrameworkActionCliTool CLI tool class, which handles various adimistrative tasks.

Member Variables

protected array $commonOptionGroups = array(
'Common options' => array(
'help',
'version',
'verbose',
'quiet',
'output',
'no-colors',
),'Project options'=>array('project','user',),)

Grouping of the common options

Grouping of the common options

protected string $description = null
Short description of the purpose of the current CLI tool

Short description of the purpose of the current CLI tool

protected ezcConsoleInput $in
Input handler

Input handler

protected string $name = 'Unnamed CLI tool'
Name of CLI tool

Name of CLI tool

protected ezcConsoleOutput $out
Output handler

Output handler

Method Summary

public void __construct( )
Create cli tool and configure basic in and out handling
protected abstract arbitController createController( $request , $options )
Get controller
protected void executeRequests( $projects , $options )
Execute request for one project
protected array getNonCommonOptions( )
Get non-common options Get options declared by specific tool implementations, which are not the common options declared by the base tool.
protected array getOptions( )
Get option values Return an array with all option values, indexed by the long names of the options.
protected string getVersion( )
Return the current version
protected void login( $request , $options )
Login user Either login a default user, with full access to everything, or use the specified user to execute the request.
protected bool processDefaultOptions( &$options , $options )
Process default options Handle the default options. stop afterwards, and false if the execution may continue.
protected bool processOptions( &$options , $options )
Process module options Handle the module options. stop afterwards, and false if the execution may continue.
protected void registerDefaultOptions( )
Register default options Register a set of default options, each arbit CLI tool should always implement.
protected void registerOptions( )
Register options Register a set of options, which are special for this CLI tool. left empty, if no additional options are required.
public void run( )
Run cli command

Methods

__construct

void __construct( )

Create cli tool and configure basic in and out handling

Create cli tool and configure basic in and out handling

Redefined in descendants as:
Method Description
arbitFrameworkCronCliTool::__construct() Create cli tool and configure basic in and out handling 

createController

arbitController createController( arbitRequest $request , $options )

Get controller

Get controller Return controller to execute for the current command

Parameters:
Name Type Description
$request arbitRequest
$options array
Redefined in descendants as:
Method Description
arbitModulePdependAdminCliTool::createController() Get controller 
arbitModulePhplocAdminCliTool::createController() Get controller 
arbitModuleSourceAdminCliTool::createController() Get controller 
arbitModuleTrackerAdminCliTool::createController() Get controller 
arbitModulePhpcsAdminCliTool::createController() Get controller 
arbitModulePhpDocAdminCliTool::createController() Get controller 
arbitModulePhpunitAdminCliTool::createController() Get controller 
arbitFrameworkCouchdbCliTool::createController() Get controller 
arbitFrameworkAdminCliTool::createController() Get controller 
arbitFrameworkCronCliTool::createController() Get controller 

executeRequests

void executeRequests( $projects , $options )

Execute request for one project

Execute request for one project

Parameters:
Name Type Description
$projects array
$options array

getNonCommonOptions

array getNonCommonOptions( )

Get non-common options Get options declared by specific tool implementations, which are not the common options declared by the base tool.

Get non-common options Get options declared by specific tool implementations, which are not the common options declared by the base tool.

getOptions

array getOptions( )

Get option values Return an array with all option values, indexed by the long names of the options.

Get option values Return an array with all option values, indexed by the long names of the options.

getVersion

string getVersion( )

Return the current version

Return the current version

login

void login( arbitRequest $request , $options )

Login user Either login a default user, with full access to everything, or use the specified user to execute the request.

Login user Either login a default user, with full access to everything, or use the specified user to execute the request.

Parameters:
Name Type Description
$request arbitRequest
$options array

processDefaultOptions

bool processDefaultOptions( &$options , array $options )

Process default options Handle the default options. stop afterwards, and false if the execution may continue.

Process default options Handle the default options. Returns true, if the the execution should stop afterwards, and false if the execution may continue.

Parameters:
Name Type Description
$options array
&$options array
Redefined in descendants as:
Method Description
arbitFrameworkActionCliTool::processDefaultOptions() Process default options Handle the default options. stop afterwards, and false if the execution may continue. 

processOptions

bool processOptions( &$options , array $options )

Process module options Handle the module options. stop afterwards, and false if the execution may continue.

Process module options Handle the module options. Returns true, if the the execution should stop afterwards, and false if the execution may continue.

Parameters:
Name Type Description
$options array
&$options array

registerDefaultOptions

void registerDefaultOptions( )

Register default options Register a set of default options, each arbit CLI tool should always implement.

Register default options Register a set of default options, each arbit CLI tool should always implement.

Redefined in descendants as:
Method Description
arbitFrameworkActionCliTool::registerDefaultOptions() Register options Register a set of options, which are special for this CLI tool. left empty, if no additional options are required. 

registerOptions

void registerOptions( )

Register options Register a set of options, which are special for this CLI tool. left empty, if no additional options are required.

Register options Register a set of options, which are special for this CLI tool. May be left empty, if no additional options are required.

Redefined in descendants as:
Method Description
arbitModuleSourceAdminCliTool::registerOptions() Register options Register a set of options, which are special for this CLI tool. left empty, if no additional options are required. 
arbitFrameworkCouchdbCliTool::registerOptions() Register options Register a set of options, which are special for this CLI tool. left empty, if no additional options are required. 
arbitFrameworkAdminCliTool::registerOptions() Register options Register a set of options, which are special for this CLI tool. left empty, if no additional options are required. 

run

void run( )

Run cli command

Run cli command

Documentation generated on Mon, 05 Apr 2010 14:01:41 +0200 by phpDocumentor 1.4.3