EnumCompletionResponse
class EnumCompletionResponse extends CompletionResponse
Constants
| protected MAX_VALUES |
|
Methods
__construct(string $enumClass)
Create an enum-backed completion response.
static CompletionResponse
match(array|string $items)
Create completions to match against an argument prefix.
from
CompletionResponse
static CompletionResponse
result(array|string $items)
Create a response containing the given completions.
from
CompletionResponse
resolve(string $value)
Resolve matching enum completions for the given prefix.
Details
at line 18
__construct(string $enumClass)
Create an enum-backed completion response.
in
CompletionResponse at line 40
static CompletionResponse
empty()
Create an empty completion response.
in
CompletionResponse at line 50
static CompletionResponse
match(array|string $items)
Create completions to match against an argument prefix.
in
CompletionResponse at line 64
static CompletionResponse
result(array|string $items)
Create a response containing the given completions.
at line 30
CompletionResponse
resolve(string $value)
Resolve matching enum completions for the given prefix.
in
CompletionResponse at line 87
array
values()
Get the completion values.
in
CompletionResponse at line 95
bool
hasMore()
Determine whether more completions are available.
in
CompletionResponse at line 105
array
toArray()
Convert the completion response to an array.