Documentation

FactoryCommandLoader
in package
implements CommandLoaderInterface

A simple command loader using factories to instantiate commands lazily.

Tags
author

Maxime Steinhausser maxime.steinhausser@gmail.com

Table of Contents

Interfaces

CommandLoaderInterface

Properties

$factories  : mixed

Methods

__construct()  : mixed
get()  : Command
Loads a command.
getNames()  : array<string|int, string>
has()  : bool
Checks if a command exists.

Properties

Methods

__construct()

public __construct(array<string|int, callable> $factories) : mixed
Parameters
$factories : array<string|int, callable>

Indexed by command names

getNames()

public getNames() : array<string|int, string>
Return values
array<string|int, string>

All registered command names

has()

Checks if a command exists.

public has(mixed $name) : bool
Parameters
$name : mixed
Return values
bool

        
On this page

Search results