class RouteBundle extends Bundle

Traits

Methods

setContainer(ContainerInterface $container = null)

Sets the Container.

string
getNamespace()

Gets the Bundle namespace.

from Bundle
string
getPath()

Gets the Bundle directory path.

from Bundle
boot()

Boots the Bundle.

shutdown()

Shutdowns the Bundle.

from Bundle
mixed
getRoutePath()

File path to load routes from

registerEvents(EventDispatcherInterface $dispatcher)

Register any events for the bundle

from Bundle
string
getParent()

Returns the bundle name that this bundle overrides.

from Bundle
string
getName()

Returns the bundle name (the class short name).

from Bundle
registerCommands(Application $application)

Finds and registers Commands.

from Bundle

Details

in ContainerAwareTrait at line 28
setContainer(ContainerInterface $container = null)

Sets the Container.

Parameters

ContainerInterface $container A ContainerInterface instance or null

in Bundle at line 51
string getNamespace()

Gets the Bundle namespace.

Return Value

string The Bundle namespace

in Bundle at line 65
string getPath()

Gets the Bundle directory path.

Return Value

string The Bundle absolute path

at line 9
boot()

Boots the Bundle.

in Bundle at line 80
shutdown()

Shutdowns the Bundle.

at line 21
mixed getRoutePath()

File path to load routes from

/dir/to/routes.php

Return Value

mixed

in Bundle at line 106
registerEvents(EventDispatcherInterface $dispatcher)

Register any events for the bundle

This is called after all bundles have been boot so you get access to all the services

Parameters

EventDispatcherInterface $dispatcher

in Bundle at line 122
string getParent()

Returns the bundle name that this bundle overrides.

Despite its name, this method does not imply any parent/child relationship between the bundles, just a way to extend and override an existing bundle.

Return Value

string The Bundle name it overrides or null if no parent

in Bundle at line 134
final string getName()

Returns the bundle name (the class short name).

Return Value

string The Bundle name

in Bundle at line 156
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

Parameters

Application $application An Application instance