PHP Class Symfony\Component\HttpKernel\Bundle\Bundle

Inheritance: extends Symfony\Component\DependencyInjection\ContainerAware, implements Symfony\Component\HttpKernel\Bundle\BundleInterface
Show file Open project: symfony/symfony Class Usage Examples

Protected Properties

Property Type Description
$extension
$name
$path

Public Methods

Method Description
boot ( ) Boots the Bundle.
build ( ContainerBuilder $container ) Builds the bundle.
getContainerExtension ( ) : Symfony\Component\DependencyInjection\Extension\ExtensionInterface | null Returns the bundle's container extension.
getName ( ) : string Returns the bundle name (the class short name).
getNamespace ( ) : string Gets the Bundle namespace.
getParent ( ) : string Returns the bundle parent name.
getPath ( ) : string Gets the Bundle directory path.
registerCommands ( Application $application ) Finds and registers Commands.
shutdown ( ) Shutdowns the Bundle.

Protected Methods

Method Description
createContainerExtension ( ) : Symfony\Component\DependencyInjection\Extension\ExtensionInterface | null Creates the bundle's container extension.
getContainerExtensionClass ( ) : string Returns the bundle's container extension class.

Private Methods

Method Description
parseClassName ( )

Method Details

boot() public method

Boots the Bundle.
public boot ( )

build() public method

It is only ever called once when the cache is empty. This method can be overridden to register compilation passes, other extensions, ...
public build ( ContainerBuilder $container )
$container Symfony\Component\DependencyInjection\ContainerBuilder A ContainerBuilder instance

createContainerExtension() protected method

Creates the bundle's container extension.
protected createContainerExtension ( ) : Symfony\Component\DependencyInjection\Extension\ExtensionInterface | null
return Symfony\Component\DependencyInjection\Extension\ExtensionInterface | null

getContainerExtension() public method

Returns the bundle's container extension.
public getContainerExtension ( ) : Symfony\Component\DependencyInjection\Extension\ExtensionInterface | null
return Symfony\Component\DependencyInjection\Extension\ExtensionInterface | null The container extension

getContainerExtensionClass() protected method

Returns the bundle's container extension class.
protected getContainerExtensionClass ( ) : string
return string

getName() final public method

Returns the bundle name (the class short name).
final public getName ( ) : string
return string The Bundle name

getNamespace() public method

Gets the Bundle namespace.
public getNamespace ( ) : string
return string The Bundle namespace

getParent() public method

Returns the bundle parent name.
public getParent ( ) : string
return string The Bundle parent name it overrides or null if no parent

getPath() public method

Gets the Bundle directory path.
public getPath ( ) : string
return string The Bundle absolute path

registerCommands() public method

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
public registerCommands ( Application $application )
$application Symfony\Component\Console\Application An Application instance

shutdown() public method

Shutdowns the Bundle.
public shutdown ( )

Property Details

$extension protected property

protected $extension

$name protected property

protected $name

$path protected property

protected $path