mirror of
https://github.com/RaspbianFrance/raspisms.git
synced 2025-04-20 16:37:48 +02:00
Add first valid expression ruler. Still not linked to scheduleds.
This commit is contained in:
parent
f59f7bd757
commit
f4bbfa0152
16 changed files with 1049 additions and 18 deletions
21
controllers/internals/ExpressionProvider.php
Normal file
21
controllers/internals/ExpressionProvider.php
Normal file
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
namespace controllers\internals;
|
||||
|
||||
use Symfony\Component\ExpressionLanguage\ExpressionFunction;
|
||||
use Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface;
|
||||
|
||||
class ExpressionProvider implements ExpressionFunctionProviderInterface
|
||||
{
|
||||
public function getFunctions()
|
||||
{
|
||||
return [
|
||||
ExpressionFunction::fromPhp('is_null', 'exists'),
|
||||
ExpressionFunction::fromPhp('mb_strtolower', 'lower'),
|
||||
ExpressionFunction::fromPhp('mb_strtoupper', 'upper'),
|
||||
ExpressionFunction::fromPhp('mb_substr', 'substr'),
|
||||
ExpressionFunction::fromPhp('abs', 'abs'),
|
||||
ExpressionFunction::fromPhp('strtotime', 'date'),
|
||||
];
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue