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 104
__construct(string $environment, boolean $debug, bool $preview = false)

Parameters

string $environment
boolean $debug
bool $preview

at line 120
boot()

Boots the current kernel.

at line 145
register(Container $container)

Register every services needed by Roadiz CMS.

Parameters

Container $container

at line 205
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 247
initEvents()

Register KernelEvents subscribers.

at line 286
static mixed getService(string $key)

Get Pimple dependency injection service container.

Parameters

string $key Service name

Return Value

mixed

at line 294
getEnvironment()

[email protected]}

at line 301
isDebug()

[email protected]}

at line 309
boolean isInstallMode()

Return Value

boolean

at line 317
boolean isPreview()

Return Value

boolean

at line 325
boolean isDevMode()

Return Value

boolean

at line 333
boolean isProdMode()

Return Value

boolean

at line 347
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 359
static destroy()

Clear Kernel singleton.

at line 367
Container getContainer()

Return Value

Container

at line 375
ContainerAwareInterface setContainer(Container $container)

Parameters

Container $container

Return Value

ContainerAwareInterface

at line 384
mixed get(string $serviceName)

Return a service from container.

Parameters

string $serviceName

Return Value

mixed

at line 392
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 400
terminate(Request $request, Response $response)

[email protected]}

Parameters

Request $request
Response $response

at line 413
shutdown()

[email protected]}

at line 436
getBundles()

[email protected]}

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

[email protected]}

Parameters

$name
$first

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

[email protected]}

Parameters

$name
$dir
$first

at line 458
getName()

[email protected]}

at line 466
getRootDir()

[email protected]}

at line 474
string getPublicDir()

Return Value

string Return web public root.

at line 482
string getVendorDir()

Return Value

string Return Composer vendor root folder.

at line 490
getStartTime()

[email protected]}

at line 498
getCacheDir()

[email protected]}

at line 509
getLogDir()

[email protected]}

at line 517
getCharset()

[email protected]}

at line 527
BundleInterface[] registerBundles()

Returns an array of bundles to register.

Return Value

BundleInterface[] An array of bundle instances.

at line 538
bool registerContainerConfiguration(LoaderInterface $loader)

Loads the container configuration.

Parameters

LoaderInterface $loader A LoaderInterface instance

Return Value

bool

at line 548
bool isClassInActiveBundle(string $class)

Parameters

string $class

Return Value

bool

at line 556
string serialize()

Return Value

string

at line 564
unserialize(string $data)

Parameters

string $data

at line 573
string getPublicFilesPath()

Return Value

string Return absolute path to public files folder.

at line 581
string getPublicFilesBasePath()

Return Value

string Return relative path to public files folder.

at line 589
string getPrivateFilesPath()

Return Value

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

at line 597
string getPrivateFilesBasePath()

Return Value

string Return relative path to private files folder.

at line 605
string getFontsFilesPath()

Return Value

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

at line 613
string getFontsFilesBasePath()

Return Value

string Return relative path to private font files folder.