Method |
Description |
|
__construct ( array $commands = [] ) |
Creates a new command collection. |
|
add ( Command $command ) |
Adds a command to the collection. |
|
clear ( ) |
Removes all commands from the collection. |
|
contains ( string $name ) : boolean |
Returns whether the collection contains a command with the given name. |
|
count ( ) |
|
|
filterAnonymous ( ) |
|
|
filterDefault ( ) |
|
|
filterNonAnonymous ( ) |
|
|
filterNonDefault ( ) |
|
|
get ( string $name ) : Command |
Returns a command by its name. |
|
getAliases ( ) : string[] |
Returns the aliases of all commands in the collection. |
|
getIterator ( ) |
|
|
getNames ( boolean $includeAliases = false ) : string[] |
Returns the names of all commands in the collection. |
|
isEmpty ( ) : boolean |
Returns whether the collection is empty. |
|
merge ( array $commands ) |
Adds multiple commands to the collection. |
|
offsetExists ( $name ) |
|
|
offsetGet ( $name ) |
|
|
offsetSet ( $offset, $command ) |
|
|
offsetUnset ( $name ) |
|
|
remove ( string $name ) |
Removes the command with the given name from the collection. |
|
replace ( array $commands ) |
Sets the commands in the collection. |
|
toArray ( ) : Command[] |
Returns the contents of the collection as array. |
|