forked from hyperf/hyperf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap.php
35 lines (28 loc) · 1.07 KB
/
bootstrap.php
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
27
28
29
30
31
32
33
34
35
<?php
declare(strict_types=1);
/**
* This file is part of Hyperf.
*
* @link https://www.hyperf.io
* @document https://hyperf.wiki
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/
use Hyperf\Config\Listener\RegisterPropertyHandlerListener;
use Hyperf\Di\Aop\AstVisitorRegistry;
use Hyperf\Di\Aop\PropertyHandlerVisitor;
use Hyperf\Di\Aop\ProxyCallVisitor;
use Hyperf\Di\Aop\RegisterInjectPropertyHandler;
// ini_set('display_errors', 'on');
// ini_set('display_startup_errors', 'on');
//
// error_reporting(E_ALL);
! defined('BASE_PATH') && define('BASE_PATH', __DIR__);
! defined('SWOOLE_HOOK_FLAGS') && define('SWOOLE_HOOK_FLAGS', SWOOLE_HOOK_ALL);
require_once BASE_PATH . '/vendor/autoload.php';
// Register AST visitors to the collector.
AstVisitorRegistry::insert(PropertyHandlerVisitor::class, PHP_INT_MAX / 2);
AstVisitorRegistry::insert(ProxyCallVisitor::class, PHP_INT_MAX / 2);
// Register Property Handler.
RegisterInjectPropertyHandler::register();
(new RegisterPropertyHandlerListener())->process(new \stdClass());