Symfony\Component\HttpKernel\KernelInterface::getBundle
Returns a bundle and optionally its descendants by its name.
Signature
public function getBundle(string
$name,
[Boolean
$first = true] )
Parameters
$name
— string- Bundle name
$first
— object- Whether to return the first bundle only or together with its descendants
Returns
- array
- A BundleInterface instance or an array of BundleInterface instances if $first is false
Errors/Exceptions
-
InvalidArgumentException
- when the bundle is not enabled