Documentation

AliasFactory
in package
implements FactoryInterface

Command factory used when you need to provide aliases to commands

Interfaces, Classes and Traits

FactoryInterface
Interface for creating commands by name

Table of Contents

$aliases  : array<string|int, mixed>
$client  : ClientInterface
__construct()  : mixed
factory()  : CommandInterface|null
Create a command by name

Properties

$aliases

protected array<string|int, mixed> $aliases

Associative array mapping command aliases to the aliased command

Methods

__construct()

public __construct(ClientInterface $client, array<string|int, mixed> $aliases) : mixed
Parameters
$client : ClientInterface

Client used to retry with the alias

$aliases : array<string|int, mixed>

Associative array mapping aliases to the alias

Return values
mixed

factory()

Create a command by name

public factory(mixed $name[, array<string|int, mixed> $args = array() ]) : CommandInterface|null
Parameters
$name : mixed

Command to create

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

Command arguments

Return values
CommandInterface|null

Search results