ArgumentableTrait
Table of Contents
- $argumentList : array<string|int, mixed>
- $requiredArgumentCount : array<string|int, mixed>
- generateUsageMessage() : string
- getArgumentList() : array<string|int, array<string|int, BaseArgument>>
- hasArguments() : bool
- hasRequiredArguments() : bool
- parseArguments() : array<string|int, mixed>
- registerArgument() : void
- prepare() : void
- This is where all the arguments, permissions, sub-commands, etc would be registered
Properties
$argumentList
private
array<string|int, mixed>
$argumentList
= []
$requiredArgumentCount
private
array<string|int, mixed>
$requiredArgumentCount
= []
Methods
generateUsageMessage()
public
generateUsageMessage() : string
Return values
string —getArgumentList()
public
getArgumentList() : array<string|int, array<string|int, BaseArgument>>
Return values
array<string|int, array<string|int, BaseArgument>> —hasArguments()
public
hasArguments() : bool
Return values
bool —hasRequiredArguments()
public
hasRequiredArguments() : bool
Return values
bool —parseArguments()
public
parseArguments(array<string|int, mixed> $rawArgs, CommandSender $sender) : array<string|int, mixed>
Parameters
- $rawArgs : array<string|int, mixed>
- $sender : CommandSender
Return values
array<string|int, mixed> —registerArgument()
public
registerArgument(int $position, BaseArgument $argument) : void
Parameters
- $position : int
- $argument : BaseArgument
Tags
Return values
void —prepare()
This is where all the arguments, permissions, sub-commands, etc would be registered
protected
abstract prepare() : void