|
@@ -3,11 +3,11 @@ namespace Symfony\Component\HttpKernel\Bundle
|
|
{
|
|
{
|
|
use Symfony\Component\DependencyInjection\ContainerAware;
|
|
use Symfony\Component\DependencyInjection\ContainerAware;
|
|
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
|
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
|
-use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
|
|
|
|
use Symfony\Component\Console\Application;
|
|
use Symfony\Component\Console\Application;
|
|
use Symfony\Component\Finder\Finder;
|
|
use Symfony\Component\Finder\Finder;
|
|
abstract class Bundle extends ContainerAware implements BundleInterface
|
|
abstract class Bundle extends ContainerAware implements BundleInterface
|
|
{
|
|
{
|
|
|
|
+ protected $name;
|
|
public function boot()
|
|
public function boot()
|
|
{
|
|
{
|
|
}
|
|
}
|
|
@@ -18,6 +18,14 @@ abstract class Bundle extends ContainerAware implements BundleInterface
|
|
{
|
|
{
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
|
|
+ final public function getName()
|
|
|
|
+ {
|
|
|
|
+ if (null !== $this->name) {
|
|
|
|
+ return $this->name;
|
|
|
|
+ }
|
|
|
|
+ $pos = strrpos(get_class($this), '\\');
|
|
|
|
+ return $this->name = substr(get_class($this), $pos ? $pos + 1 : 0);
|
|
|
|
+ }
|
|
public function registerExtensions(ContainerBuilder $container)
|
|
public function registerExtensions(ContainerBuilder $container)
|
|
{
|
|
{
|
|
if (!$dir = realpath($this->getPath().'/DependencyInjection')) {
|
|
if (!$dir = realpath($this->getPath().'/DependencyInjection')) {
|
|
@@ -55,6 +63,7 @@ interface BundleInterface
|
|
function boot();
|
|
function boot();
|
|
function shutdown();
|
|
function shutdown();
|
|
function getParent();
|
|
function getParent();
|
|
|
|
+ function getName();
|
|
function getNamespace();
|
|
function getNamespace();
|
|
function getPath();
|
|
function getPath();
|
|
}
|
|
}
|