\phpDocumentorKernel

Summary

Methods
Properties
Constants
getWorkingDir()
getCacheDir()
getLogDir()
getProjectDir()
registerBundles()
build()
isPhar()
No public properties found
CONFIG_EXTS
configureContainer()
configureRoutes()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Constants

CONFIG_EXTS

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

Methods

getWorkingDir()

getWorkingDir() : string

Returns the current working directory.

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 —

getCacheDir()

getCacheDir() : string

Returns

string —

getLogDir()

getLogDir() : string

Returns

string —

getProjectDir()

getProjectDir() : string

Override needed for auto-detection when installed using Composer.

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 —

registerBundles()

registerBundles() : iterable

Returns

iterable —

build()

build(\Symfony\Component\DependencyInjection\ContainerBuilder  $container) : void

Parameters

\Symfony\Component\DependencyInjection\ContainerBuilder $container

isPhar()

isPhar() : bool

Returns

bool —

configureContainer()

configureContainer(\Symfony\Component\DependencyInjection\ContainerBuilder  $c, \Symfony\Component\Config\Loader\LoaderInterface  $loader) : void

Parameters

\Symfony\Component\DependencyInjection\ContainerBuilder $c
\Symfony\Component\Config\Loader\LoaderInterface $loader

configureRoutes()

configureRoutes(\Symfony\Component\Routing\RouteCollectionBuilder  $routes) : void

Parameters

\Symfony\Component\Routing\RouteCollectionBuilder $routes