eZ Publish Community Project (Legacy Stack) 2013.4
Class

ezpKernel

class ezpKernel implements ezpKernelHandler

Base eZ Publish kernel class.

Wraps a "kernel handler" and forwards calls to it. This allows to have different kernel handlers depending on the context (i.e. "web" or "cli")

Methods

__construct(ezpKernelHandler $kernelHandler)

ezpKernelResult|false run()

Execution point for controller actions.

mixed runCallback(Closure $callback, bool $postReinitialize = true)

Runs a callback function in the kernel environment.

setUseExceptions(bool $useExceptions)

Sets whether to use exceptions inside the kernel.

reInitialize()

Reinitializes the kernel environment.

bool hasServiceContainer()

Checks whether the kernel handler has the Symfony service container container or not.

ContainerInterface|null getServiceContainer()

Returns the Symfony service container if it has been injected, otherwise returns null.

static ezpKernel instance()

Returns the current instance of ezpKernel.

Details

at line 27
public __construct(ezpKernelHandler $kernelHandler)

Parameters

ezpKernelHandler $kernelHandler

at line 51
public ezpKernelResult|false run()

Execution point for controller actions.

Returns false if not supported

Return Value

ezpKernelResult|false

at line 66
public mixed runCallback(Closure $callback, bool $postReinitialize = true)

Runs a callback function in the kernel environment.

This is useful to run eZ Publish 4.x code from a non-related context (like eZ Publish 5)

Parameters

Closure $callback
bool $postReinitialize Default is true. If set to false, the kernel environment will not be reinitialized. This can be useful to optimize several calls to the kernel within the same context.

Return Value

mixed The result of the callback

at line 76
public setUseExceptions(bool $useExceptions)

Sets whether to use exceptions inside the kernel.

Parameters

bool $useExceptions

at line 84
public reInitialize()

Reinitializes the kernel environment.

at line 95
public bool hasServiceContainer()

Checks whether the kernel handler has the Symfony service container container or not.

Return Value

bool

at line 106
public ContainerInterface|null getServiceContainer()

Returns the Symfony service container if it has been injected, otherwise returns null.

Return Value

ContainerInterface|null

at line 117
static public ezpKernel instance()

Returns the current instance of ezpKernel.

Return Value

ezpKernel

Exceptions

LogicException if no instance of ezpKernel has been instantiated