raspisms/controllers/internals/ExpressionProvider.php

22 lines
709 B
PHP

<?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'),
];
}
}