Beta version

class Kernel implements ServiceProviderInterface, KernelInterface, TerminableInterface, ContainerAwareInterface, FileAwareInterface

Constants

CMS_VERSION

SECURITY_DOMAIN

INSTALL_CLASSNAME

Properties

static $cmsBuild
static $cmsVersion
Container|null $container

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]}

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)

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

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

Parameters

string $environment
boolean $debug
bool $preview

at line 122
boot()

Boots the current kernel.

at line 147
register(Container $container)

Register every services needed by Roadiz CMS.

Parameters

Container $container

at line 209
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

at line 251
initEvents()

Register KernelEvents subscribers.

at line 290
static mixed getService(string $key)

Get Pimple dependency injection service container.

Parameters

string $key Service name

Return Value

mixed

at line 298
getEnvironment()

[email protected]}

at line 305
isDebug()

[email protected]}

at line 313
boolean isInstallMode()

Return Value

boolean

at line 321
boolean isPreview()

Return Value

boolean

at line 329
boolean isDevMode()

Return Value

boolean

at line 337
boolean isProdMode()

Return Value

boolean

at line 351
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

at line 363
static destroy()

Clear Kernel singleton.

at line 371
Container getContainer()

Return Value

Container

at line 379
ContainerAwareInterface setContainer(Container $container)

Parameters

Container $container

Return Value

ContainerAwareInterface

at line 388
mixed get(string $serviceName)

Return a service from container.

Parameters

string $serviceName

Return Value

mixed

at line 396
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

at line 404
terminate(Request $request, Response $response)

[email protected]}

Parameters

Request $request
Response $response

at line 417
shutdown()

[email protected]}

at line 440
getBundles()

[email protected]}

at line 448
getBundle($name, $first = true)

[email protected]}

Parameters

$name
$first

at line 455
locateResource($name, $dir = null, $first = true)

[email protected]}

Parameters

$name
$dir
$first

at line 462
getName()

[email protected]}

at line 470
getRootDir()

[email protected]}

at line 478
string getPublicDir()

Return Value

string Return web public root.

at line 486
string getVendorDir()

Return Value

string Return Composer vendor root folder.

at line 494
getStartTime()

[email protected]}

at line 502
getCacheDir()

[email protected]}

at line 513
getLogDir()

[email protected]}

at line 521
getCharset()

[email protected]}

at line 531
BundleInterface[] registerBundles()

Returns an array of bundles to register.

Return Value

BundleInterface[] An array of bundle instances.

at line 542
bool registerContainerConfiguration(LoaderInterface $loader)

Loads the container configuration.

Parameters

LoaderInterface $loader A LoaderInterface instance

Return Value

bool

at line 552
bool isClassInActiveBundle(string $class)

Parameters

string $class

Return Value

bool

at line 560
string serialize()

Return Value

string

at line 568
unserialize(string $data)

Parameters

string $data

at line 577
string getPublicFilesPath()

Return Value

string Return absolute path to public files folder.

at line 585
string getPublicFilesBasePath()

Return Value

string Return relative path to public files folder.

at line 593
string getPrivateFilesPath()

Return Value

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

at line 601
string getPrivateFilesBasePath()

Return Value

string Return relative path to private files folder.

at line 609
string getFontsFilesPath()

Return Value

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

at line 617
string getFontsFilesBasePath()

Return Value

string Return relative path to private font files folder.