2019-01-13 03:06:53 +08:00
|
|
|
<?php
|
2019-04-10 16:08:36 +08:00
|
|
|
|
2019-06-24 13:40:24 +08:00
|
|
|
declare(strict_types=1);
|
|
|
|
/**
|
|
|
|
* This file is part of Hyperf.
|
|
|
|
*
|
|
|
|
* @link https://www.hyperf.io
|
2020-07-15 17:05:45 +08:00
|
|
|
* @document https://hyperf.wiki
|
2019-06-24 13:40:24 +08:00
|
|
|
* @contact group@hyperf.io
|
2019-10-22 09:35:48 +08:00
|
|
|
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
|
2019-06-24 13:40:24 +08:00
|
|
|
*/
|
2020-05-25 18:31:06 +08:00
|
|
|
use Hyperf\Config\Listener\RegisterPropertyHandlerListener;
|
2020-05-29 13:27:11 +08:00
|
|
|
use Hyperf\Di\Aop\AstVisitorRegistry;
|
|
|
|
use Hyperf\Di\Aop\PropertyHandlerVisitor;
|
|
|
|
use Hyperf\Di\Aop\ProxyCallVisitor;
|
|
|
|
use Hyperf\Di\Aop\RegisterInjectPropertyHandler;
|
2020-05-25 16:57:36 +08:00
|
|
|
|
2021-12-10 15:57:48 +08:00
|
|
|
// ini_set('display_errors', 'on');
|
|
|
|
// ini_set('display_startup_errors', 'on');
|
|
|
|
//
|
|
|
|
// error_reporting(E_ALL);
|
|
|
|
|
2019-01-13 03:06:53 +08:00
|
|
|
! defined('BASE_PATH') && define('BASE_PATH', __DIR__);
|
2019-09-10 16:26:54 +08:00
|
|
|
! defined('SWOOLE_HOOK_FLAGS') && define('SWOOLE_HOOK_FLAGS', SWOOLE_HOOK_ALL);
|
2019-04-10 16:08:36 +08:00
|
|
|
|
2019-06-24 13:40:24 +08:00
|
|
|
require_once BASE_PATH . '/vendor/autoload.php';
|
2020-05-25 16:57:36 +08:00
|
|
|
|
2020-05-29 13:27:11 +08:00
|
|
|
// Register AST visitors to the collector.
|
2021-11-09 17:13:51 +08:00
|
|
|
AstVisitorRegistry::insert(PropertyHandlerVisitor::class);
|
|
|
|
AstVisitorRegistry::insert(ProxyCallVisitor::class);
|
2020-05-29 13:27:11 +08:00
|
|
|
|
|
|
|
// Register Property Handler.
|
|
|
|
RegisterInjectPropertyHandler::register();
|
2020-05-25 18:31:06 +08:00
|
|
|
|
2024-03-23 19:28:51 +08:00
|
|
|
(new RegisterPropertyHandlerListener())->process(new stdClass());
|