mirror of
https://github.com/elyby/accounts.git
synced 2025-02-05 00:19:40 +05:30
Интергрирован фреймворк для поддержки аспектного программирования
This commit is contained in:
parent
e6fe2f3755
commit
867c1a2b3b
13
api/aop/AspectKernel.php
Normal file
13
api/aop/AspectKernel.php
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<?php
|
||||||
|
namespace api\aop;
|
||||||
|
|
||||||
|
use api\aop\aspects;
|
||||||
|
use Go\Core\AspectContainer;
|
||||||
|
use Go\Core\AspectKernel as BaseAspectKernel;
|
||||||
|
|
||||||
|
class AspectKernel extends BaseAspectKernel {
|
||||||
|
|
||||||
|
protected function configureAop(AspectContainer $container): void {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,14 +1,31 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use api\aop\AspectKernel;
|
||||||
|
use common\config\ConfigLoader;
|
||||||
|
use yii\web\Application;
|
||||||
|
|
||||||
require __DIR__ . '/../../vendor/autoload.php';
|
require __DIR__ . '/../../vendor/autoload.php';
|
||||||
|
|
||||||
defined('YII_DEBUG') or define('YII_DEBUG', in_array(getenv('YII_DEBUG'), ['false', '1']));
|
defined('YII_DEBUG') or define('YII_DEBUG', in_array(getenv('YII_DEBUG'), ['true', '1']));
|
||||||
defined('YII_ENV') or define('YII_ENV', getenv('YII_ENV'));
|
defined('YII_ENV') or define('YII_ENV', getenv('YII_ENV'));
|
||||||
|
|
||||||
|
// Initialize an application aspect container
|
||||||
|
AspectKernel::getInstance()->init([
|
||||||
|
'debug' => YII_DEBUG,
|
||||||
|
'appDir' => __DIR__ . '/../../',
|
||||||
|
'cacheDir' => __DIR__ . '/../runtime/aspect',
|
||||||
|
'excludePaths' => [
|
||||||
|
__DIR__ . '/../runtime/aspect',
|
||||||
|
__DIR__ . '/../../vendor',
|
||||||
|
],
|
||||||
|
]);
|
||||||
|
|
||||||
require __DIR__ . '/../../vendor/yiisoft/yii2/Yii.php';
|
require __DIR__ . '/../../vendor/yiisoft/yii2/Yii.php';
|
||||||
|
spl_autoload_unregister(['Yii', 'autoload']);
|
||||||
require __DIR__ . '/../../common/config/bootstrap.php';
|
require __DIR__ . '/../../common/config/bootstrap.php';
|
||||||
require __DIR__ . '/../config/bootstrap.php';
|
require __DIR__ . '/../config/bootstrap.php';
|
||||||
|
|
||||||
$config = \common\config\ConfigLoader::load('api');
|
$config = ConfigLoader::load('api');
|
||||||
|
|
||||||
$application = new yii\web\Application($config);
|
$application = new Application($config);
|
||||||
$application->run();
|
$application->run();
|
||||||
|
@ -23,7 +23,9 @@
|
|||||||
"spomky-labs/otphp": "^9.0.2",
|
"spomky-labs/otphp": "^9.0.2",
|
||||||
"bacon/bacon-qr-code": "^1.0",
|
"bacon/bacon-qr-code": "^1.0",
|
||||||
"paragonie/constant_time_encoding": "^2.0",
|
"paragonie/constant_time_encoding": "^2.0",
|
||||||
"webmozart/assert": "^1.2.0"
|
"webmozart/assert": "^1.2.0",
|
||||||
|
"goaop/framework": "~2.1.2",
|
||||||
|
"domnikl/statsd": "^2.6"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"yiisoft/yii2-debug": "*",
|
"yiisoft/yii2-debug": "*",
|
||||||
@ -51,6 +53,11 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"autoload": {
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"api\\": "api",
|
||||||
|
"common\\": "common",
|
||||||
|
"console\\": "console"
|
||||||
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"common/consts.php"
|
"common/consts.php"
|
||||||
]
|
]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user