Initial commit
This commit is contained in:
commit
08a8a71c55
631 changed files with 139902 additions and 0 deletions
29
public/site/plugins/kql/src/Kql/Query.php
Normal file
29
public/site/plugins/kql/src/Kql/Query.php
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
|
||||
namespace Kirby\Kql;
|
||||
|
||||
use Kirby\Query\Query as BaseQuery;
|
||||
|
||||
/**
|
||||
* Extends the core Query class with the KQL-specific
|
||||
* functionalities to intercept the segments chain calls
|
||||
*
|
||||
* @package Kirby KQL
|
||||
* @author Nico Hoffmann <nico@getkirby.com>
|
||||
* @link https://getkirby.com
|
||||
* @copyright Bastian Allgeier
|
||||
* @license https://getkirby.com/license
|
||||
*/
|
||||
class Query extends BaseQuery
|
||||
{
|
||||
/**
|
||||
* Intercepts the chain of segments called
|
||||
* on each other by replacing objects with
|
||||
* their corresponding Interceptor which
|
||||
* handles blocking calls to restricted methods
|
||||
*/
|
||||
public function intercept(mixed $result): mixed
|
||||
{
|
||||
return is_object($result) ? Interceptor::replace($result): $result;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue