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

Constants

CMS_VERSION

SECURITY_DOMAIN

INSTALL_CLASSNAME

Properties

static $cmsBuild
static $cmsVersion
static protected $instance
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.

static mixed
getService(string $key)

Get Pimple dependency injection service container.

getEnvironment()

[email protected]}

isDebug()

[email protected]}

boolean
isInstallMode()

No description

boolean
isPreview()

No description

boolean
isDevMode()

No description

boolean
isProdMode()

No description

static Kernel
getInstance(string $environment = 'prod', bool $debug = false, bool $preview = false)

Return unique instance of Kernel.

static 
destroy()

Clear Kernel singleton.

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)

[email protected]}

shutdown()

[email protected]}

HttpKernel
getHttpKernel()

Gets a HTTP kernel from the container.

getBundles()

[email protected]}

getBundle($name, $first = true)

[email protected]}

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

[email protected]}

getName()

[email protected]}

getRootDir()

[email protected]}

string
getPublicDir()

No description

string
getVendorDir()

No description

getStartTime()

[email protected]}

getCacheDir()

[email protected]}

getLogDir()

[email protected]}

getCharset()

[email protected]}

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

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.

static mixed getService(string $key)

Get Pimple dependency injection service container.

Parameters

string $key Service name

Return Value

mixed

getEnvironment()

[email protected]}

isDebug()

[email protected]}

boolean isInstallMode()

Return Value

boolean

boolean isPreview()

Return Value

boolean

boolean isDevMode()

Return Value

boolean

boolean isProdMode()

Return Value

boolean

static Kernel getInstance(string $environment = 'prod', bool $debug = false, bool $preview = false)

Return unique instance of Kernel.

Parameters

string $environment
bool $debug
bool $preview

Return Value

Kernel

static destroy()

Clear Kernel singleton.

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)

[email protected]}

Parameters

Request $request
Response $response

shutdown()

[email protected]}

protected HttpKernel getHttpKernel()

Gets a HTTP kernel from the container.

Return Value

HttpKernel

getBundles()

[email protected]}

getBundle($name, $first = true)

[email protected]}

Parameters

$name
$first

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

[email protected]}

Parameters

$name
$dir
$first

getName()

[email protected]}

getRootDir()

[email protected]}

string getPublicDir()

Return Value

string Return web public root.

string getVendorDir()

Return Value

string Return Composer vendor root folder.

getStartTime()

[email protected]}

getCacheDir()

[email protected]}

getLogDir()

[email protected]}

getCharset()

[email protected]}

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.

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.