update kirby
This commit is contained in:
parent
652262ac94
commit
9c662bcbba
165 changed files with 1757 additions and 598 deletions
|
|
@ -25,7 +25,7 @@ class Expression
|
|||
/**
|
||||
* Parses an expression string into its parts
|
||||
*/
|
||||
public static function factory(string $expression, Query $parent = null): static|Segments
|
||||
public static function factory(string $expression, Query|null $parent = null): static|Segments
|
||||
{
|
||||
// split into different expression parts and operators
|
||||
$parts = static::parse($expression);
|
||||
|
|
|
|||
|
|
@ -131,12 +131,12 @@ Query::$entries['site'] = function (): Site {
|
|||
|
||||
Query::$entries['t'] = function (
|
||||
string $key,
|
||||
string|array $fallback = null,
|
||||
string $locale = null
|
||||
string|array|null $fallback = null,
|
||||
string|null $locale = null
|
||||
): string|null {
|
||||
return I18n::translate($key, $fallback, $locale);
|
||||
};
|
||||
|
||||
Query::$entries['user'] = function (string $id = null): User|null {
|
||||
Query::$entries['user'] = function (string|null $id = null): User|null {
|
||||
return App::instance()->user($id);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ class Segments extends Collection
|
|||
* Split query string into segments by dot
|
||||
* but not inside (nested) parens
|
||||
*/
|
||||
public static function factory(string $query, Query $parent = null): static
|
||||
public static function factory(string $query, Query|null $parent = null): static
|
||||
{
|
||||
$segments = static::parse($query);
|
||||
$position = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue