CompletionResponse
abstract class CompletionResponse implements Arrayable
Constants
| protected MAX_VALUES |
|
Methods
__construct(array $values, bool $hasMore = false, int|null $total = null)
Create a completion response.
static CompletionResponse
empty()
Create an empty completion response.
static CompletionResponse
match(array|string $items)
Create completions to match against an argument prefix.
static CompletionResponse
result(array|string $items)
Create a response containing the given completions.
resolve(string $value)
Resolve completions for an argument value.
array
values()
Get the completion values.
bool
hasMore()
Determine whether more completions are available.
array
toArray()
Convert the completion response to an array.
Details
at line 23
__construct(array $values, bool $hasMore = false, int|null $total = null)
Create a completion response.
at line 40
static CompletionResponse
empty()
Create an empty completion response.
at line 50
static CompletionResponse
match(array|string $items)
Create completions to match against an argument prefix.
at line 64
static CompletionResponse
result(array|string $items)
Create a response containing the given completions.
at line 80
abstract CompletionResponse
resolve(string $value)
Resolve completions for an argument value.
at line 87
array
values()
Get the completion values.
at line 95
bool
hasMore()
Determine whether more completions are available.
at line 105
array
toArray()
Convert the completion response to an array.