class DevKernel extends Kernel (View source)

DevKernel is meant for Vagrant and Docker development env where using file sharing on Roadiz folder.

Constants

CMS_VERSION

SECURITY_DOMAIN

INSTALL_CLASSNAME

Properties

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

Methods

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

No description

boot()

Boots the current kernel.

from Kernel
register(Container $container)

Register every services needed by Roadiz CMS.

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

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

from Kernel
initEvents()

Register KernelEvents subscribers.

from Kernel
static mixed
getService(string $key)

Get Pimple dependency injection service container.

from Kernel
getEnvironment()

[email protected]}

from Kernel
isDebug()

[email protected]}

from Kernel
boolean
isInstallMode()

No description

from Kernel
boolean
isPreview()

No description

from Kernel
boolean
isDevMode()

No description

from Kernel
boolean
isProdMode()

No description

from Kernel
static Kernel
getInstance(string $environment = 'dev', bool $debug = true, bool $preview = false, string $appName = "roadiz_dev")

No description

static 
destroy()

Clear Kernel singleton.

from Kernel
Container
getContainer()

No description

from Kernel
setContainer(Container $container)

No description

from Kernel
mixed
get(string $serviceName)

Return a service from container.

from Kernel
bool
has(string $serviceName)

Returns true if the service is defined.

from Kernel
terminate(Request $request, Response $response)

[email protected]}

from Kernel
shutdown()

[email protected]}

from Kernel
HttpKernel
getHttpKernel()

Gets a HTTP kernel from the container.

from Kernel
getBundles()

[email protected]}

from Kernel
getBundle($name, $first = true)

[email protected]}

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

[email protected]}

from Kernel
getName()

[email protected]}

from Kernel
getRootDir()

[email protected]}

from Kernel
string
getPublicDir()

No description

from Kernel
string
getVendorDir()

No description

from Kernel
getStartTime()

[email protected]}

from Kernel
getCacheDir()

It’s important to set cache dir outside of any shared folder. RAM disk is a good idea.

getLogDir()

It’s important to set logs dir outside of any shared folder. RAM disk is a good idea.

getCharset()

[email protected]}

from Kernel
BundleInterface[]
registerBundles()

Returns an array of bundles to register.

from Kernel
bool
registerContainerConfiguration(LoaderInterface $loader)

Loads the container configuration.

from Kernel
bool
isClassInActiveBundle(string $class) deprecated

No description

from Kernel
string
serialize()

No description

from Kernel
unserialize(string $data)

No description

from Kernel
string
getPublicFilesPath()

No description

from Kernel
string
getPublicFilesBasePath()

No description

from Kernel
string
getPrivateFilesPath()

No description

from Kernel
string
getPrivateFilesBasePath()

No description

from Kernel
string
getFontsFilesPath()

No description

from Kernel
string
getFontsFilesBasePath()

No description

from Kernel

Details

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

Parameters

string $environment
boolean $debug
bool $preview
string $appName

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 = 'dev', bool $debug = true, bool $preview = false, string $appName = "roadiz_dev")

Parameters

string $environment
bool $debug
bool $preview
string $appName

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()

It’s important to set cache dir outside of any shared folder. RAM disk is a good idea.

getLogDir()

It’s important to set logs dir outside of any shared folder. RAM disk is a good idea.

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.