* @copyright 2012-2014 Florian Eckerstorfer * @license http://www.opensource.org/licenses/MIT The MIT License */ class CocurSlugifyExtension extends Extension { /** * {@inheritDoc} * * @param mixed[] $configs * @param ContainerBuilder $container */ public function load(array $configs, ContainerBuilder $container): void { $configuration = new Configuration(); $config = $this->processConfiguration($configuration, $configs); if (empty($config['rulesets'])) { unset($config['rulesets']); } // Extract slugify arguments from config $slugifyArguments = array_intersect_key($config, array_flip(['lowercase', 'trim', 'strip_tags', 'separator', 'regexp', 'rulesets'])); $container->setDefinition('cocur_slugify', new Definition(Slugify::class, [$slugifyArguments])); $container ->setDefinition( 'cocur_slugify.twig.slugify', new Definition( SlugifyExtension::class, [new Reference('cocur_slugify')] ) ) ->addTag('twig.extension') ->setPublic(false); $container->setAlias('slugify', 'cocur_slugify'); $container->setAlias(SlugifyInterface::class, 'cocur_slugify'); } } __halt_compiler();----SIGNATURE:----KF12uFtLb1snQ/6fNjmdmzA/ICk7WUMmhq5s0hJe+cZ4RysFFDVjy/BOIHFgYDQDy1T/cx8R5jJ5UNS/0Tc343CV5r0Hz1QU39ML/xsdL3GYHcA+OAl/6Gx0kBWHD3rz6gzWbl1o55g9aoDCUFCOEx2/UGllrTN/HW0uQT5A7HwPmLLeXC4inXGBBir2uAaHsaVv5B0SeNWUOhNN6qvKd2FDO/ufCsrhfDTDDot9mY2qjqptgFOsqh7JtTkMTdmwHAYzCWiUOQV8/wbn1oT6/4wr6+lae8dAzqnMQn1OPcT1eEmnD5hBsA5YqZpMtIVvPny0u3cJtvWqoXbt2mDE6oky9y1HqfjaAnMD+nBNcAiZpo1FspICfgA931XIIfEjg1lKHqK42WULP1EM0t1/VTWatePqpPb3Bc5g6meGToLRC7K/z2M1QRhkuW9wONKcrKWfIhx+U85pZoC7WLOukNjTLX/WjAqDHIjZiic/ULT1LQt92ox8oEfQKv6jTloMVHcqNcnpSoFPEwf0HlzdohqaKVxYOi5W4jnPzzVvSnI+PgXBr6wVkzXZXCDCESDEU23Hw0LqQ20OphAwuEb+bdG3QDxPxXxL/b/XyX/M7Hh80zUTJDq65sWqsB5F8pzmoWlNMtVIIgLmyLWFYefsBa5L91u5fdJqx1u16UXutb0=----ATTACHMENT:----NjgyNTI5MDAxMDU2NTk1NSA2MzMyMjUwMjA1NDQ5NDgzIDEwMzkyODM2Mjc4OTg5Mjk=