11
0
Fork 0
mirror of https://github.com/n3w/helpers-cli-input.git synced 2025-12-20 21:23:24 +00:00

Updated to work with more than just Argument and Option input types. Makes use of InputTypeFactory to allow addition of new types as needed. Added InputTypeFactory to help with loading input type classes

This commit is contained in:
Alannah Kearney 2019-05-24 17:16:49 +10:00
commit 9e27b52991
8 changed files with 144 additions and 143 deletions

View file

@ -12,15 +12,9 @@ interface InputHandlerInterface
public function validate(): void;
public function getArgument(string $name): ?string;
public function find(string $name);
// note that the return value of getOption() isn't always going to be
// a string like getArgument()
public function getOption(string $name);
public function getArguments(): array;
public function getOptions(): array;
public function getInput(): array;
public function getCollection(): ?Input\InputCollection;
}

View file

@ -16,4 +16,5 @@ interface InputTypeInterface
const FLAG_TYPE_INCREMENTING = 0x0400;
public function getType(): string;
public function respondsTo(string $name): bool;
}