Kernel

in package
extends Kernel Uses MicroKernelTrait

Interfaces, Classes & Used Traits

MicroKernelTrait
codeCoverageIgnore

Kernels do not need to be covered; mostly configuration anyway

Constants

mixed CONFIG_EXTS = '.{php,xml,yaml,yml}'

Methods

Returns the current working directory.

publicgetWorkingDir() : string

By default, symfony does not track the current working directory. Since we want to use this information to locate certain resources, such as the configuration files, we add a new method in the kernel that can be used as an expression to be passed to service definitions.

For example:

    phpDocumentor\Configuration\ConfigurationFactory:
      arguments:
        $defaultFiles:
          - "@=service('kernel').getWorkingDir() ~ '/phpdoc.xml'"
          - "@=service('kernel').getWorkingDir() ~ '/phpdoc.dist.xml'"
          - "@=service('kernel').getWorkingDir() ~ '/phpdoc.xml.dist'"

Returns

string

publicgetCacheDir() : string

Returns

string

publicgetLogDir() : string

Returns

string

Override needed for auto-detection when installed using Composer.

publicgetProjectDir() : string

I am not quite sure why, but without this overridden method Symfony will use the 'src' directory as Project Dir when phpDocumentor is installed using Composer. Without being installed with composer it works fine without this hack.

Returns

string

publicregisterBundles() : iterable

Returns

iterable

publicstaticisPhar() : bool

Returns

bool

protectedconfigureContainer(ContainerBuilder $container, LoaderInterface $loader) : void

Parameters

$container : ContainerBuilder
$loader : LoaderInterface

protectedconfigureRoutes(RouteCollectionBuilder $routes) : void

Parameters

$routes : RouteCollectionBuilder