* @license http://www.opensource.org/licenses/MIT The MIT License */ class SlugifyExtension extends CompilerExtension { public function loadConfiguration(): void { $builder = $this->getContainerBuilder(); $builder->addDefinition($this->prefix('slugify')) ->setClass('Cocur\Slugify\SlugifyInterface') ->setFactory('Cocur\Slugify\Slugify'); $builder->addDefinition($this->prefix('helper')) ->setClass('Cocur\Slugify\Bridge\Latte\SlugifyHelper') ->setAutowired(false); } public function beforeCompile(): void { $builder = $this->getContainerBuilder(); $self = $this; $registerToLatte = function (ServiceDefinition $def) use ($self) { $def->addSetup('addFilter', ['slugify', [$self->prefix('@helper'), 'slugify']]); }; $latteFactory = $builder->getByType('Nette\Bridges\ApplicationLatte\ILatteFactory') ?: 'nette.latteFactory'; if ($builder->hasDefinition($latteFactory)) { $registerToLatte($builder->getDefinition($latteFactory)); } if ($builder->hasDefinition('nette.latte')) { $registerToLatte($builder->getDefinition('nette.latte')); } } } __halt_compiler();----SIGNATURE:----inYRSJxmAOXJ7DtRVziENMvONVJMyAPezPRIOAkhrT2c04VCIBGVWayMgwxW4HXwk1Lku0oGKEk9F22bEwHU5xU8Cp/HuIMnWP8behwqeYSRCeW1SFcbk8YKSqDqaTrBOkP6t9AE1ogcb1845g1dXD8pLuJ25E0PLVjBSK4BNby+ftqKscHMIo0Odc4bqVA+zDZP/+zpdH0uqPmSTr+MicxK66C3csmHRJlG7RFxp758HQoCVCbAvGmrwQ0MLwqaxSFdSue1r0cmFHppGpRyccJ8RKSHUFnWo8tLRlx02n7cvMP1wd8EBMxvb+tHiRc9sZDbglTce5Q2ZPgZ8AEgeSAzRhp8Dffkdd2ghzBGDkukuqFt50zGBQ1C4x3iDR7GAMW9Lms2R9Kg6nE6GrECzEoWYwGUbfJQmrzsMMnr3iMX6tWkj2e1ic2nqwZ0pcvQLeUqcB1SfFjs3CehZctVZn85WQZm/hCLmmC2piHNxqzlgnxe/yZ0+V8H0SnFRsxbAa83kbecQBaICkhZy1/qgoY+pCJNXeAO6G8R4ZQHselT27IpU2kHqz4u6M+GnZXpnCYYxDHtCGMYXuEFVKluVL8LWR+Zm2hFA/JP6W5IvEYMH5ByK9yVQOs37NCkAq/8jM0mAmCswbjJYJPlszlcVnhKBzu1LAVn893fJLvwoC8=----ATTACHMENT:----ODIyMTQ2MzUzNDMwMjYwMCA5OTU3MzAxNzYwMjE2NTMyIDc2ODgzMjQ1MzA1Njg5Ng==