phpDocumentor

Kernel extends Kernel
in package
Uses MicroKernelTrait

Tags
codeCoverageIgnore

Kernels do not need to be covered; mostly configuration anyway

Table of Contents

CONFIG_EXTS  = '.{php,xml,yaml,yml}'
build()  : void
getCacheDir()  : string
getLogDir()  : string
getProjectDir()  : string
Override needed for auto-detection when installed using Composer.
getWorkingDir()  : string
Returns the current working directory.
isPhar()  : bool
registerBundles()  : iteratable<string|int, mixed>
configureContainer()  : void
configureRoutes()  : void

Constants

CONFIG_EXTS

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

Methods

build()

public build(ContainerBuilder $container) : void
Parameters
$container : ContainerBuilder
Tags
Return values
void

getCacheDir()

public getCacheDir() : string
Tags
Return values
string

getLogDir()

public getLogDir() : string
Tags
Return values
string

getProjectDir()

Override needed for auto-detection when installed using Composer.

public getProjectDir() : 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.

Tags
Return values
string

getWorkingDir()

Returns the current working directory.

public getWorkingDir() : 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'"
Tags
noinspection

PhpUnused this method is used in the services.yaml and the inspection does not pick this up.

Return values
string

isPhar()

public static isPhar() : bool
Tags
Return values
bool

registerBundles()

public registerBundles() : iteratable<string|int, mixed>
Tags
Return values
iteratable<string|int, mixed>

configureContainer()

protected configureContainer(ContainerBuilder $c, LoaderInterface $loader) : void
Parameters
$c : ContainerBuilder
$loader : LoaderInterface
Tags
Return values
void

configureRoutes()

protected configureRoutes(RouteCollectionBuilder $routes) : void
Parameters
$routes : RouteCollectionBuilder
Tags
Return values
void

        

Search results