-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbootstrap.php
More file actions
26 lines (22 loc) · 921 Bytes
/
Copy pathbootstrap.php
File metadata and controls
26 lines (22 loc) · 921 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php
/**
* Native matrix library
*
* @copyright Copyright 2019, Lisachenko Alexander <lisachenko.it@gmail.com>
*
* This source file is subject to the license that is bundled
* with this source code in the file LICENSE.
*/
declare(strict_types=1);
use Lisachenko\NativePhpMatrix\Matrix;
use ZEngine\Core;
use ZEngine\Reflection\ReflectionClass as ReflectionClassEx;
// We can not be sure that the Z-Engine library was already initialized by another package, so probe the engine state
// instead of the class existence: Core::$executor is a typed static property that is assigned only by Core::init(),
// therefore an uninitialized property means that nobody has booted the engine yet.
if (!isset(Core::$executor)) {
Core::init();
}
// Activate extensions for the Matrix class as it provides
$matrixClassReflection = new ReflectionClassEx(Matrix::class);
$matrixClassReflection->installExtensionHandlers();