eZPublishCommunityProject(LegacyStack)  2013.9
ezpKernel Class Reference

File containing the ezpKernel class. More...

+ Inheritance diagram for ezpKernel:
+ Collaboration diagram for ezpKernel:

Public Member Functions

 __construct (ezpKernelHandler $kernelHandler)
 
 getServiceContainer ()
 Returns the Symfony service container if it has been injected, otherwise returns null. More...
 
 hasServiceContainer ()
 Checks whether the kernel handler has the Symfony service container container or not. More...
 
 reInitialize ()
 Reinitializes the kernel environment. More...
 
 run ()
 Execution point for controller actions. More...
 
 runCallback (\Closure $callback, $postReinitialize=true)
 Runs a callback function in the kernel environment. More...
 
 setUseExceptions ($useExceptions)
 Sets whether to use exceptions inside the kernel. More...
 
 setUsePagelayout ($usePagelayout)
 

Static Public Member Functions

static instance ()
 Returns the current instance of ezpKernel. More...
 

Static Protected Attributes

static $instance = null
 

Private Attributes

 $kernelHandler
 

Detailed Description

File containing the ezpKernel class.

Version
2013.9 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")

Constructor & Destructor Documentation

ezpKernel::__construct ( ezpKernelHandler  $kernelHandler)

PHP 5.3.3 is our hard requirement

Member Function Documentation

ezpKernel::getServiceContainer ( )

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

Returns
|null

Implements ezpKernelHandler.

ezpKernel::hasServiceContainer ( )

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

Returns
bool

Implements ezpKernelHandler.

static ezpKernel::instance ( )
static

Returns the current instance of ezpKernel.

Exceptions
LogicExceptionif no instance of ezpKernel has been instantiated
Returns
ezpKernel
ezpKernel::reInitialize ( )

Reinitializes the kernel environment.

Implements ezpKernelHandler.

ezpKernel::run ( )

Execution point for controller actions.

Returns false if not supported

Returns
ezpKernelResult|false

Implements ezpKernelHandler.

ezpKernel::runCallback ( \Closure  $callback,
  $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$postReinitializeDefault 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.
Returns
mixed The result of the callback

Implements ezpKernelHandler.

ezpKernel::setUseExceptions (   $useExceptions)

Sets whether to use exceptions inside the kernel.

Parameters
bool$useExceptions

Implements ezpKernelHandler.

ezpKernel::setUsePagelayout (   $usePagelayout)
Parameters
bool$usePagelayout

Implements ezpWebBasedKernelHandler.

Member Data Documentation

ezpKernel::$instance = null
staticprotected
ezpKernel::$kernelHandler
private

Referenced by __construct().


The documentation for this class was generated from the following file: