xref: /webtrees/app/Report/ReportExpressionLanguageProvider.php (revision 89f7189b61a494347591c99bdb92afb7d8b66e1b)
1cb63a60eSGreg Roach<?php
23976b470SGreg Roach
3cb63a60eSGreg Roach/**
4cb63a60eSGreg Roach * webtrees: online genealogy
5*89f7189bSGreg Roach * Copyright (C) 2021 webtrees development team
6cb63a60eSGreg Roach * This program is free software: you can redistribute it and/or modify
7cb63a60eSGreg Roach * it under the terms of the GNU General Public License as published by
8cb63a60eSGreg Roach * the Free Software Foundation, either version 3 of the License, or
9cb63a60eSGreg Roach * (at your option) any later version.
10cb63a60eSGreg Roach * This program is distributed in the hope that it will be useful,
11cb63a60eSGreg Roach * but WITHOUT ANY WARRANTY; without even the implied warranty of
12cb63a60eSGreg Roach * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13cb63a60eSGreg Roach * GNU General Public License for more details.
14cb63a60eSGreg Roach * You should have received a copy of the GNU General Public License
15*89f7189bSGreg Roach * along with this program. If not, see <https://www.gnu.org/licenses/>.
16cb63a60eSGreg Roach */
17fcfa147eSGreg Roach
18e7f56f2aSGreg Roachdeclare(strict_types=1);
19e7f56f2aSGreg Roach
20cb63a60eSGreg Roachnamespace Fisharebest\Webtrees\Report;
21cb63a60eSGreg Roach
22cb63a60eSGreg Roachuse Symfony\Component\ExpressionLanguage\ExpressionFunction;
23cb63a60eSGreg Roachuse Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface;
24cb63a60eSGreg Roach
25cb63a60eSGreg Roach/**
26cb63a60eSGreg Roach * Class ReportExpressionLanguageProvider - support functions in report expressions.
27cb63a60eSGreg Roach */
28cb63a60eSGreg Roachclass ReportExpressionLanguageProvider implements ExpressionFunctionProviderInterface
29cb63a60eSGreg Roach{
30cb63a60eSGreg Roach    /**
31cb63a60eSGreg Roach     * @return ExpressionFunction[]
32cb63a60eSGreg Roach     */
33cb63a60eSGreg Roach    public function getFunctions(): array
34cb63a60eSGreg Roach    {
35cb63a60eSGreg Roach        return [
36cb63a60eSGreg Roach            ExpressionFunction::fromPhp('stristr'),
37cb63a60eSGreg Roach        ];
38cb63a60eSGreg Roach    }
39cb63a60eSGreg Roach}
40