Bundle
class Bundle implements BundleInterface
An implementation of BundleInterface that adds a few conventions for DependencyInjection extensions and Console commands.
Traits
Methods
Boots the Bundle.
Shutdowns the Bundle.
Returns the bundle's container extension.
Gets the Bundle namespace.
Gets the Bundle directory path.
Returns the bundle parent name.
Returns the bundle name (the class short name).
Details
in ContainerAwareTrait at line line 31
setContainer(ContainerInterface $container = null)
Sets the container.
at line line 38
boot()
Boots the Bundle.
at line line 45
shutdown()
Shutdowns the Bundle.
at line line 59
build(ContainerBuilder $container)
Builds the bundle.
It is only ever called once when the cache is empty.
This method can be overridden to register compilation passes, other extensions, ...
at line line 70
ExtensionInterface|null
getContainerExtension()
Returns the bundle's container extension.
at line line 107
string
getNamespace()
Gets the Bundle namespace.
at line line 119
string
getPath()
Gets the Bundle directory path.
at line line 134
string
getParent()
Returns the bundle parent name.
at line line 143
final string
getName()
Returns the bundle name (the class short name).
at line line 165
registerCommands(Application $application)
Finds and registers Commands.
Override this method if your bundle commands do not follow the conventions:
- Commands are in the 'Command' sub-directory
- Commands extend Symfony\Component\Console\Command\Command