Documentation

Application
in package

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.

Tags
author

Jan Schneider jan@horde.org

category

Horde

copyright

2017 Horde LLC

license

http://www.horde.org/licenses/bsd BSD

Table of Contents

$arguments  : array<string|int, mixed>
$cli  : Horde_Cli
$parser  : Horde_Argv_Parser
$values  : Horde_Argv_Values
$_arguments  : array<string|int, mixed>
$_cli  : Horde_Cli
$_parser  : Horde_Argv_Parser
$_values  : Horde_Argv_Values
__call()  : mixed
Delegates calls to the embedded Horde_Cli and Horde_Argv_Parser objects.
__construct()  : mixed
Constructor.
__get()  : mixed
Getter.
__set()  : mixed
Setter.
run()  : mixed
Runs the application.
_doRun()  : mixed
Excecutes the actual application logic.

Properties

$arguments read-only

public array<string|int, mixed> $arguments

Additional arguments.

$parser

public Horde_Argv_Parser $parser

Argument parser.

$values read-only

public Horde_Argv_Values $values

Argument option values.

$_arguments

protected array<string|int, mixed> $_arguments

Methods

__call()

Delegates calls to the embedded Horde_Cli and Horde_Argv_Parser objects.

public __call(string $method, array<string|int, mixed> $args) : mixed
Parameters
$method : string

Method name.

$args : array<string|int, mixed>

Method arguments.

Return values
mixed

Result of method call.

__construct()

Constructor.

public __construct([Horde_Cli $cli = null ][, array<string|int, mixed> $parserArgs = array() ]) : mixed
Parameters
$cli : Horde_Cli = null

A Horde_Cli instance.

$parserArgs : array<string|int, mixed> = array()

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

Return values
mixed

__get()

Getter.

public __get(string $property) : mixed
Parameters
$property : string

Property to return.

Return values
mixed

__set()

Setter.

public __set(string $property, mixed $value) : mixed
Parameters
$property : string

Property to set.

$value : mixed

Value to set.

Return values
mixed

run()

Runs the application.

public run() : mixed
Return values
mixed

_doRun()

Excecutes the actual application logic.

protected _doRun() : mixed
Return values
mixed

Search results