for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
/**
* This file is part of TwigView.
*
** (c) 2014 Cees-Jan Kiewiet
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace WyriHaximus\TwigView\Lib\Twig\Extension;
use Twig\Extension\AbstractExtension;
use Twig\TwigFunction;
* Class I18n.
* @package WyriHaximus\TwigView\Lib\Twig\Extension
final class I18n extends AbstractExtension
{
* Get declared functions.
* @return \Twig\TwigFunction[]
public function getFunctions(): array
return [
new TwigFunction('__', '__'),
new TwigFunction('__d', '__d'),
new TwigFunction('__n', '__n'),
new TwigFunction('__x', '__x'),
new TwigFunction('__dn', '__dn'),
];
}
* Get extension name.
* @return string
public function getName(): string
return 'i18n';