1. Go to this page and download the library: Download neunerlei/lockpick-bundle library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?phprequire_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
neunerlei / lockpick-bundle example snippets
namespaceApp;
useApp\Override\NotSoFinalUrlHelper;
useNeunerlei\LockpickBundle\ClassOverridesKernelTrait;
useNeunerlei\LockpickBundle\Overrides\OverrideGeneratorConfig;
useSymfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
useSymfony\Component\HttpFoundation\UrlHelper;
useSymfony\Component\HttpKernel\KernelasBaseKernel;
classKernelextendsBaseKernel{
useMicroKernelTrait;
// Add this trait to your kerneluseClassOverridesKernelTrait;
/**
* @inheritDoc
*/publicfunctionboot(): void{
// The configureOverrideGenerator accepts a closure as parameter, which will receive an instance of // {@see OverrideGeneratorConfig} you can use to configure all facets of the override generator...$this->configureOverrideGenerator(staticfunction(OverrideGeneratorConfig $config): void{
// You can add your overrides through the speaking configuration interface,// take a look at the code documentation if you feel lost.
$config->registerOverride(UrlHelper::class, NotSoFinalUrlHelper::class);
// You can also chain multiple overrides
$config
->registerOverride(AcmeBundle\ClassToOverride::class, YourBundle\ClassToOverrideWith::class)
->registerOverride(AnotherAcmeBundle\AnotherClassToOverride::class, YourBundle\AnotherClassToOverrideWith::class);
// Those options are optional and will be automatically set if omitted:// The absolute path to your composer autoload.php. If omitted the script tries to find the autoloader itself
$config->setComposerAutoloadPath('/...');
// The path where the generated class copies should be stored
$config->setStoragePath('/...')
});
// IMPORTANT! Configure the override generator BEFORE calling parent::boot()!parent::boot();
}
}
return [
Neunerlei\LockpickBundle\LockpickBundle::class => ['all' => true], // <- The bundle should be loaded here...
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
];
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.