Skip to content

Kirby 6.0.0

$runner->run()

Executes a query within a given data context

$runner->run() has been marked as unstable. It might be changed in a future Kirby major or minor release without being considered a breaking change. Use with caution.

$runner->run(string $query, array $context = []): mixed

Parameters

Name Type Default Description
$queryrequired string no default value
$context array [] Optional variables to be passed to the query

Return type

mixed

Exceptions

Type Description
Exception when query is invalid or executor not callable

Parent class

Kirby\Query\Runners\Runner