<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
hostnet / hn-dependency-injection-plugin example snippets
composer.phar
unit
protected function createKernel()
{
return new MyKernel($this);
}
class MyKernel extends Hostnet\HnDependencyInjectionPlugin\Symfony1Kernel
{
public function registerBundles()
{
$bundles = array(
new Symfony\Bundle\FrameworkBundle\FrameworkBundle()
);
return array_merge($bundles, parent::registerBundles());
}
}
config/ProjectConfiguration.php
use Doctrine\Common\Annotations\AnnotationRegistry;
$loader =
if ($this->getEnvironment() == 'dev') {
$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
}