Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

Public Member Functions | Static Public Member Functions | Static Protected Attributes | Private Attributes | List of all members
ezpKernel Class Reference
Inheritance diagram for ezpKernel:

## Public Member Functions
| __construct (ezpKernelHandler $kernelHandler)
| run ()
| runCallback (\Closure $callback, $postReinitialize=true)
| setUseExceptions ( $useExceptions)
| setUsePagelayout ( $usePagelayout)
| reInitialize ()
| hasServiceContainer ()
| getServiceContainer ()

## Static Public Member Functions
static | hasInstance ()
static | instance ()

## Static Protected Attributes
static | $instance = null

## Private Attributes
| $kernelHandler

## Detailed Description

File containing the ezpKernel class.

Copyright
  Copyright (C) eZ Systems AS. All rights reserved. @license For full copyright and license information view LICENSE file distributed with this source code.

Version
  //autogentag// Base Exponential 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")

Definition at line 16 of file ezpkernel.php.

## Constructor & Destructor Documentation

## ◆ __construct()

ezpKernel::__construct | ( | ezpKernelHandler | $kernelHandler | ) |

PHP 5.3.3 is our hard requirement

Definition at line 28 of file ezpkernel.php.

References $instance, $kernelHandler, and exit.

## Member Function Documentation

## ◆ getServiceContainer()

ezpKernel::getServiceContainer | ( |  | ) |

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

Returns
  \Symfony\Component\DependencyInjection\ContainerInterface|null

Implements ezpKernelHandler.

Definition at line 118 of file ezpkernel.php.

## ◆ hasInstance()

static ezpKernel::hasInstance | ( |  | ) |
| static

Checks if the kernel has already been instantiated.

Returns
  bool

Definition at line 128 of file ezpkernel.php.

References $instance.

## ◆ hasServiceContainer()

ezpKernel::hasServiceContainer | ( |  | ) |

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

Returns
  bool

Implements ezpKernelHandler.

Definition at line 107 of file ezpkernel.php.

## ◆ instance()

static ezpKernel::instance | ( |  | ) |
| static

Returns the current instance of ezpKernel.

Exceptions

  LogicException | if no instance of ezpKernel has been instantiated

Returns
  ezpKernel

Definition at line 139 of file ezpkernel.php.

References $instance.

Referenced by ezpContentPublishingProcess\publish().

## ◆ reInitialize()

ezpKernel::reInitialize | ( |  | ) |

Reinitializes the kernel environment.

Implements ezpKernelHandler.

Definition at line 96 of file ezpkernel.php.

## ◆ run()

ezpKernel::run | ( |  | ) |

Execution point for controller actions. Returns false if not supported

Returns
  ezpKernelResult|false

Implements ezpKernelHandler.

Definition at line 52 of file ezpkernel.php.

## ◆ runCallback()

ezpKernel::runCallback | ( | \Closure | $callback,
|  |  | $postReinitialize = `true`
| ) |  |

Runs a callback function in the kernel environment. This is useful to run Exponential 4.x code from a non-related context (like Exponential 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.

Returns
  mixed The result of the callback

Implements ezpKernelHandler.

Definition at line 67 of file ezpkernel.php.

## ◆ setUseExceptions()

ezpKernel::setUseExceptions | ( |  | $useExceptions | ) |

Sets whether to use exceptions inside the kernel.

Parameters

  bool | $useExceptions |

Implements ezpKernelHandler.

Definition at line 77 of file ezpkernel.php.

## ◆ setUsePagelayout()

ezpKernel::setUsePagelayout | ( |  | $usePagelayout | ) |

Parameters

  bool | $usePagelayout |

Implements ezpWebBasedKernelHandler.

Definition at line 85 of file ezpkernel.php.

## Member Data Documentation

## ◆ $instance

ezpKernel::$instance = null
| static protected

Definition at line 26 of file ezpkernel.php.

Referenced by instance().

## ◆ $kernelHandler

ezpKernel::$kernelHandler
| private

Definition at line 21 of file ezpkernel.php.

Referenced by __construct().

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

- ezpkernel.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.