Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

ezpbkernel.php
Go to the documentation of this file.
1 <?php
16 class ezpbKernel implements ezpWebBasedKernelHandler
17 {
21 private $kernelHandler;
22
26 protected static $instance = null;
27
28 public function __construct( ezpKernelHandler $kernelHandler )
29 {
33 if ( version_compare( PHP_VERSION, '5.3.3' ) < 0 )
34 {
35 echo "<h1>Unsupported PHP version " . PHP_VERSION . "</h1>",
36 "<p>Exponential 5.x does not run with PHP version lower than 5.3.3.</p>",
37 "<p>For more information about supported software please visit ",
38 "<a href=\"http://ez.no/\" >us, eZ Systems, on http://ez.no</a>. See you there :-)</p>";
39 exit;
40 }
41
42 $this->kernelHandler = $kernelHandler;
43 self::$instance = $this;
44 }
45
52 public function run()
53 {
54 return $this->kernelHandler->run();
55 }
56
67 public function runCallback( \Closure $callback, $postReinitialize = true )
68 {
69 return $this->kernelHandler->runCallback( $callback, $postReinitialize );
70 }
71
77 public static function setUseExceptions( $useExceptions )
78 {
79 $this->kernelHandler->setUseExceptions( $useExceptions );
80 }
81
85 public function setUsePagelayout( $usePagelayout )
86 {
87 if ( $this->kernelHandler instanceof ezpWebBasedKernelHandler )
88 {
89 $this->kernelHandler->setUsePagelayout( $usePagelayout );
90 }
91 }
92
96 public function reInitialize()
97 {
98 $this->kernelHandler->reInitialize();
99 }
100
107 public function hasServiceContainer()
108 {
109 return $this->kernelHandler->hasServiceContainer();
110 }
111
118 public function getServiceContainer()
119 {
120 return $this->kernelHandler->getServiceContainer();
121 }
122
128 public static function hasInstance()
129 {
130 return self::$instance !== null;
131 }
132
139 public static function instance()
140 {
141 if ( !self::hasInstance() )
142 {
143 throw new LogicException(
144 'Cannot return the instance of '
145 . __CLASS__
146 . ', it has not been instantiated'
147 );
148 }
149 return self::$instance;
150 }
151 }
152
ezpbKernel
Definition: ezpbkernel.php:17
ezpbKernel\run
run()
Definition: ezpbkernel.php:52
ezpbKernel\hasServiceContainer
hasServiceContainer()
Definition: ezpbkernel.php:107
ezpbKernel\setUsePagelayout
setUsePagelayout( $usePagelayout)
Definition: ezpbkernel.php:85
ezpbKernel\reInitialize
reInitialize()
Definition: ezpbkernel.php:96
ezpbKernel\instance
static instance()
Definition: ezpbkernel.php:139
ezpbKernel\__construct
__construct(ezpKernelHandler $kernelHandler)
Definition: ezpbkernel.php:28
ezpbKernel\hasInstance
static hasInstance()
Definition: ezpbkernel.php:128
ezpbKernel\$kernelHandler
$kernelHandler
Definition: ezpbkernel.php:21
ezpbKernel\$instance
static $instance
Definition: ezpbkernel.php:26
ezpbKernel\getServiceContainer
getServiceContainer()
Definition: ezpbkernel.php:118
ezpbKernel\setUseExceptions
static setUseExceptions( $useExceptions)
Definition: ezpbkernel.php:77
ezpbKernel\runCallback
runCallback(\Closure $callback, $postReinitialize=true)
Definition: ezpbkernel.php:67
exit
exit
Definition: folder.php:81
ezpKernelHandler
Definition: ezpkernelhandler.php:15
ezpWebBasedKernelHandler
Definition: ezpwebbasedkernelhandler.php:15
$instance
$instance
Definition: orderedit.php:667
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.