Phpcraft
|
Public Member Functions | |
__construct (CommandSender &$sender, string $arg) | |
getValue () | |
acceptsMore () | |
isFinished () | |
acceptNext (string $arg) | |
Static Public Member Functions | |
static | noop () |
static | write (Connection $con) |
static | read (Connection $con) |
Protected Attributes | |
$value | |
Extend this class to create a custom argument provider for Commands. All declared classes will automagically be scanned and if they extends this class, it will be registered as the provider of the type that their getValue function returns. User input will be given to the constructor, if it is invalid for your type, simply throw a DomainException or similar. Should the type you're providing require more than one "word", feel free to override isFinished and acceptNext.
|
abstract |
Reimplemented in Phpcraft\Command\ClientConfigurationProvider, Phpcraft\Command\QuotedStringProvider, Phpcraft\Command\ClientConnectionProvider, Phpcraft\Command\StringProvider, Phpcraft\Command\FloatProvider, Phpcraft\Command\IntegerProvider, Phpcraft\Command\GreedyStringProvider, Phpcraft\Command\UnimplementedParser, and Phpcraft\Command\SingleWordStringProvider.
Phpcraft\Command\ArgumentProvider::acceptNext | ( | string | $arg | ) |
string | $arg |
Reimplemented in Phpcraft\Command\QuotedStringProvider, and Phpcraft\Command\GreedyStringProvider.
Phpcraft\Command\ArgumentProvider::acceptsMore | ( | ) |
Reimplemented in Phpcraft\Command\QuotedStringProvider, and Phpcraft\Command\GreedyStringProvider.
|
abstract |
Reimplemented in Phpcraft\Command\QuotedStringProvider, Phpcraft\Command\ClientConfigurationProvider, Phpcraft\Command\ClientConnectionProvider, Phpcraft\Command\FloatProvider, Phpcraft\Command\IntegerProvider, Phpcraft\Command\GreedyStringProvider, Phpcraft\Command\StringProvider, Phpcraft\Command\SingleWordStringProvider, and Phpcraft\Command\UnimplementedParser.
Phpcraft\Command\ArgumentProvider::isFinished | ( | ) |
Reimplemented in Phpcraft\Command\QuotedStringProvider.
|
static |
Does nothing and shouldn't do anything. This function is called on "native" argument providers by Command so they are forced into existence.
|
static |
|
static |
Connection | $con |
Reimplemented in Phpcraft\Command\QuotedStringProvider, Phpcraft\Command\ClientConfigurationProvider, Phpcraft\Command\FloatProvider, Phpcraft\Command\IntegerProvider, and Phpcraft\Command\GreedyStringProvider.
|
protected |