PHP Class Airship\Hangar\Command

Afficher le fichier Open project: paragonie/airship Class Usage Examples

Méthodes publiques

Свойство Type Description
$cache array Cache references to other commands
$description string
$display integer
$essential boolean
$name string
$session array hangar.session.json
$tag array
$userConfig Current user's configuration

Protected Properties

Свойство Type Description
$c array BASH COLORS
$config array hangar.json

Méthodes publiques

Méthode Description
fire ( array $args = [] ) : boolean Execute a command
getCommandObject ( string $name, boolean $cache = true ) : self Return a command
getCommandStatic ( string $name, boolean $cache = true ) : Command Return a command (statically callable)
getScreenSize ( ) : array Return the size of the current terminal window
getToken ( string $supplier ) : string Get a token for HTTP requests
saveConfig ( ) Save the configuration
storeConfig ( array $data = [] )
usageInfo ( array $args = [] ) : boolean Display the usage information for this command.

Méthodes protégées

Méthode Description
getSession ( ) : mixed Get the session data
prompt ( string $text ) : string Prompt the user for an input value
silentPrompt ( string $text = "Enter Password:" ) : string Interactively prompts for input without echoing to the terminal.

Method Details

fire() abstract public méthode

Execute a command
abstract public fire ( array $args = [] ) : boolean
$args array
Résultat boolean

getCommandObject() public méthode

Return a command
public getCommandObject ( string $name, boolean $cache = true ) : self
$name string
$cache boolean
Résultat self (derived class)

getCommandStatic() public static méthode

Return a command (statically callable)
public static getCommandStatic ( string $name, boolean $cache = true ) : Command
$name string
$cache boolean
Résultat Command

getScreenSize() public méthode

Return the size of the current terminal window
public getScreenSize ( ) : array
Résultat array (int, int)

getSession() final protected méthode

Get the session data
final protected getSession ( ) : mixed
Résultat mixed

getToken() public méthode

Get a token for HTTP requests
public getToken ( string $supplier ) : string
$supplier string
Résultat string

prompt() final protected méthode

Prompt the user for an input value
final protected prompt ( string $text ) : string
$text string
Résultat string

saveConfig() final public méthode

Save the configuration
final public saveConfig ( )

silentPrompt() final protected méthode

Requires a bash shell or Windows and won't work with safe_mode settings (Uses shell_exec)
final protected silentPrompt ( string $text = "Enter Password:" ) : string
$text string
Résultat string

storeConfig() final public méthode

final public storeConfig ( array $data = [] )
$data array

usageInfo() public méthode

Display the usage information for this command.
public usageInfo ( array $args = [] ) : boolean
$args array - CLI arguments
Résultat boolean

Property Details

$c protected_oe property

BASH COLORS
protected array $c
Résultat array

$cache public_oe static_oe property

Cache references to other commands
public static array $cache
Résultat array

$config protected_oe property

hangar.json
protected array $config
Résultat array

$description public_oe property

public string $description
Résultat string

$display public_oe property

public int $display
Résultat integer

$essential public_oe property

public bool $essential
Résultat boolean

$name public_oe property

public string $name
Résultat string

$session public_oe property

hangar.session.json
public array $session
Résultat array

$tag public_oe property

public array $tag
Résultat array

$userConfig public_oe static_oe property

Current user's configuration
public static $userConfig