\Horde\CliApplication

This class implements a complete command line application.

The embedded Horde_Cli and Horde_Argv_Parser objects are proxied, so you can call any of their methods on the \Horde\Cli\Application object too.

Summary

Methods
Properties
Constants
__construct()
__call()
__get()
__set()
run()
$parser
$arguments
$cli
$values
No constants found
_doRun()
$_cli
$_parser
$_values
$_arguments
N/A
No private methods found
No private properties found
N/A

Properties

$parser

$parser : \Horde\Cli\Horde_Argv_Parser

Argument parser.

Type

\Horde\Cli\Horde_Argv_Parser

$arguments

$arguments : array

Additional arguments.

Type

array

$cli

$cli : \Horde\Cli\Horde_Cli

CLI helper.

Type

\Horde\Cli\Horde_Cli

$values

$values : \Horde\Cli\Horde_Argv_Values

Argument option values.

Type

\Horde\Cli\Horde_Argv_Values

$_cli

$_cli : \Horde\Cli\Horde_Cli

Type

\Horde\Cli\Horde_Cli

$_parser

$_parser : \Horde\Cli\Horde_Argv_Parser

Type

\Horde\Cli\Horde_Argv_Parser

$_values

$_values : \Horde\Cli\Horde_Argv_Values

Type

\Horde\Cli\Horde_Argv_Values

$_arguments

$_arguments : array

Type

array

Methods

__construct()

__construct(\Horde\Cli\Horde_Cli  $cli = null, array  $parserArgs = array()) 

Constructor.

Parameters

\Horde\Cli\Horde_Cli $cli

A Horde_Cli instance.

array $parserArgs

Any additional arguments for Horde_Argv_Parser, e.g. 'usage', 'version', 'description', 'epilog'.

__call()

__call(string  $method, array  $args) : mixed

Delegates calls to the embedded Horde_Cli and Horde_Argv_Parser objects.

Parameters

string $method

Method name.

array $args

Method arguments.

Returns

mixed —

Result of method call.

__get()

__get(string  $property) 

Getter.

Parameters

string $property

Property to return.

__set()

__set(string  $property, mixed  $value) 

Setter.

Parameters

string $property

Property to set.

mixed $value

Value to set.

run()

run() 

Runs the application.

_doRun()

_doRun() 

Excecutes the actual application logic.