|
|
|
|
|
|
|
|
new TwigFilter('sov_cache', [$this, 'sovCache']), |
|
|
new TwigFilter('sov_cache', [$this, 'sovCache']), |
|
|
new TwigFilter('slugify', [$this, 'slugify']), |
|
|
new TwigFilter('slugify', [$this, 'slugify']), |
|
|
new TwigFilter('md5', [$this, 'md5']), |
|
|
new TwigFilter('md5', [$this, 'md5']), |
|
|
|
|
|
new TwigFilter('rot13', [$this, 'rot13']), |
|
|
]; |
|
|
]; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public function rot13(string $string): string |
|
|
|
|
|
{ |
|
|
|
|
|
return str_rot13($string); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
public function isInstanceOf(EntityInterface $entity, string $interfaceName) |
|
|
public function isInstanceOf(EntityInterface $entity, string $interfaceName) |
|
|
{ |
|
|
{ |
|
|
$reflection = new \ReflectionClass($entity); |
|
|
$reflection = new \ReflectionClass($entity); |