class Kernel implements ServiceProviderInterface, KernelInterface, TerminableInterface, ContainerAwareInterface, FileAwareInterface (View source)

Constants

CMS_VERSION

SECURITY_DOMAIN

INSTALL_CLASSNAME

Properties

static $cmsBuild
static $cmsVersion
Container|null $container
protected $environment
protected $debug
protected $preview
protected $booted
protected $rootDir
protected $name
protected $startTime

Methods

__construct(string $environment, boolean $debug, bool $preview = false)

No description

boot()

Boots the current kernel.

register(Container $container)

Register every services needed by Roadiz CMS.

Response
handle(Request $request, int $type = HttpKernelInterface::MASTER_REQUEST, bool $catch = true)

Handles a Roadiz master Request and transforms it into a Response.

initEvents()

Register KernelEvents subscribers.

getEnvironment()

{@inheritdoc}

isDebug()

{@inheritdoc}

boolean
isInstallMode()

No description

boolean
isPreview()

No description

boolean
isDevMode()

No description

boolean
isProdMode()

No description

Container
getContainer()

No description

setContainer(Container $container)

No description

mixed
get(string $serviceName)

Return a service from container.

bool
has(string $serviceName)

Returns true if the service is defined.

terminate(Request $request, Response $response)

{@inheritdoc}

shutdown()

{@inheritdoc}

HttpKernel
getHttpKernel()

Gets a HTTP kernel from the container.

getBundles()

{@inheritdoc}

getBundle($name, $first = true)

{@inheritdoc}

locateResource($name, $dir = null, $first = true)

{@inheritdoc}

getName()

{@inheritdoc}

getRootDir()

{@inheritdoc}

string
getPublicDir()

No description

string
getVendorDir()

No description

getStartTime()

{@inheritdoc}

getCacheDir()

{@inheritdoc}

getLogDir()

{@inheritdoc}

getCharset()

{@inheritdoc}

BundleInterface[]
registerBundles()

Returns an array of bundles to register.

bool
registerContainerConfiguration(LoaderInterface $loader)

Loads the container configuration.

bool
isClassInActiveBundle(string $class) deprecated

No description

string
serialize()

No description

unserialize(string $data)

No description

string
getPublicFilesPath()

No description

string
getPublicFilesBasePath()

No description

getPublicCachePath()

No description

getPublicCacheBasePath()

No description

string
getPrivateFilesPath()

No description

string
getPrivateFilesBasePath()

No description

string
getFontsFilesPath()

No description

string
getFontsFilesBasePath()

No description

Details

__construct(string $environment, boolean $debug, bool $preview = false)

Parameters

string $environment
boolean $debug
bool $preview

boot()

Boots the current kernel.

register(Container $container)

Register every services needed by Roadiz CMS.

Parameters

Container $container

Response handle(Request $request, int $type = HttpKernelInterface::MASTER_REQUEST, bool $catch = true)

Handles a Roadiz master Request and transforms it into a Response.

Roadiz default handling is by-passed for assets serving.

Parameters

Request $request
int $type
bool $catch

Return Value

Response

initEvents()

Register KernelEvents subscribers.

getEnvironment()

{@inheritdoc}

isDebug()

{@inheritdoc}

boolean isInstallMode()

Return Value

boolean

boolean isPreview()

Return Value

boolean

boolean isDevMode()

Return Value

boolean

boolean isProdMode()

Return Value

boolean

Container getContainer()

Return Value

Container

ContainerAwareInterface setContainer(Container $container)

Parameters

Container $container

Return Value

ContainerAwareInterface

mixed get(string $serviceName)

Return a service from container.

Parameters

string $serviceName

Return Value

mixed

bool has(string $serviceName)

Returns true if the service is defined.

Parameters

string $serviceName

Return Value

bool true if the service is defined, false otherwise

terminate(Request $request, Response $response)

{@inheritdoc}

Parameters

Request $request
Response $response

shutdown()

{@inheritdoc}

protected HttpKernel getHttpKernel()

Gets a HTTP kernel from the container.

Return Value

HttpKernel

getBundles()

{@inheritdoc}

getBundle($name, $first = true)

{@inheritdoc}

Parameters

$name
$first

locateResource($name, $dir = null, $first = true)

{@inheritdoc}

Parameters

$name
$dir
$first

getName()

{@inheritdoc}

getRootDir()

{@inheritdoc}

string getPublicDir()

Return Value

string Return web public root.

string getVendorDir()

Return Value

string Return Composer vendor root folder.

getStartTime()

{@inheritdoc}

getCacheDir()

{@inheritdoc}

getLogDir()

{@inheritdoc}

getCharset()

{@inheritdoc}

BundleInterface[] registerBundles()

Returns an array of bundles to register.

Return Value

BundleInterface[] An array of bundle instances.

bool registerContainerConfiguration(LoaderInterface $loader)

Loads the container configuration.

Parameters

LoaderInterface $loader A LoaderInterface instance

Return Value

bool

bool isClassInActiveBundle(string $class) deprecated

deprecated since version 2.6, to be removed in 3.0.

Parameters

string $class

Return Value

bool

string serialize()

Return Value

string

unserialize(string $data)

Parameters

string $data

string getPublicFilesPath()

Return Value

string Return absolute path to public files folder.

string getPublicFilesBasePath()

Return Value

string Return relative path to public files folder.

getPublicCachePath()

getPublicCacheBasePath()

string getPrivateFilesPath()

Return Value

string Return absolute path to private files folder. Path must be protected.

string getPrivateFilesBasePath()

Return Value

string Return relative path to private files folder.

string getFontsFilesPath()

Return Value

string Return absolute path to private font files folder. Path must be protected.

string getFontsFilesBasePath()

Return Value

string Return relative path to private font files folder.