Symfony\Component\HttpKernel\Bundle\Bundle::getNamespace PHP Method

getNamespace() public method

Gets the Bundle namespace.
public getNamespace ( ) : string
return string The Bundle namespace
    public function getNamespace()
    {
        if (null === $this->namespace) {
            $this->parseClassName();
        }

        return $this->namespace;
    }

Usage Example

Ejemplo n.º 1
0
 /**
  * Register an installer service
  *
  * @param BaseBundle $bundleInfos
  * @param string $type Type (install, update or uninstall)
  * @param string $class Class (Install, Update or Uninstall)
  */
 protected function registerInstallerService(BaseBundle $bundleInfos, $type, $class)
 {
     $serviceId = strtolower($bundleInfos->getName()) . '.installer.' . $type;
     $fullyQualifiedClass = $bundleInfos->getNamespace() . '\\Service\\Install\\' . $class;
     $serviceOptions = array('calls' => array(array('setContainer' => array('@service_container'))), 'tags' => array(array('name' => 'bundle.' . $type)));
     $this->registerService($bundleInfos->getName(), $serviceId, $fullyQualifiedClass, $serviceOptions);
 }
All Usage Examples Of Symfony\Component\HttpKernel\Bundle\Bundle::getNamespace