class DirectCompletionResponse extends CompletionResponse

Constants

protected MAX_VALUES

Methods

__construct(array $values, bool $hasMore = false, int|null $total = null)

Create a completion response.

empty()

Create an empty completion response.

match(array|string $items)

Create completions to match against an argument prefix.

result(array|string $items)

Create a response containing the given completions.

resolve(string $value)

Return the already resolved completion response.

array
values()

Get the completion values.

bool
hasMore()

Determine whether more completions are available.

array
toArray()

Convert the completion response to an array.

Details

in CompletionResponse at line 23
__construct(array $values, bool $hasMore = false, int|null $total = null)

Create a completion response.

Parameters

array $values
bool $hasMore
int|null $total

in CompletionResponse at line 40
static CompletionResponse empty()

Create an empty completion response.

Return Value

CompletionResponse

in CompletionResponse at line 50
static CompletionResponse match(array|string $items)

Create completions to match against an argument prefix.

Parameters

array|string $items

Return Value

CompletionResponse

in CompletionResponse at line 64
static CompletionResponse result(array|string $items)

Create a response containing the given completions.

Parameters

array|string $items

Return Value

CompletionResponse

at line 12
CompletionResponse resolve(string $value)

Return the already resolved completion response.

Parameters

string $value

Return Value

CompletionResponse

in CompletionResponse at line 87
array values()

Get the completion values.

Return Value

array

in CompletionResponse at line 95
bool hasMore()

Determine whether more completions are available.

Return Value

bool

in CompletionResponse at line 105
array toArray()

Convert the completion response to an array.

Return Value

array