Skip to content

Kirby 5.2.1

$defaultRunner->run()

Executes a query within a given data context

$defaultRunner->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.

$defaultRunner->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

This method modifies the existing $defaultrunner object it is applied to and returns it again.

Exceptions

Type Description
Exception when query is invalid or executor not callable

Parent class

Kirby\Query\Runners\DefaultRunner