From 867c1a2b3be14cb942b0a9e0289bf1a67b45a708 Mon Sep 17 00:00:00 2001 From: ErickSkrauch Date: Mon, 13 Nov 2017 17:14:58 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D0=BD=D1=82=D0=B5=D1=80=D0=B3=D1=80?= =?UTF-8?q?=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BD=20=D1=84=D1=80=D0=B5=D0=B9?= =?UTF-8?q?=D0=BC=D0=B2=D0=BE=D1=80=D0=BA=20=D0=B4=D0=BB=D1=8F=20=D0=BF?= =?UTF-8?q?=D0=BE=D0=B4=D0=B4=D0=B5=D1=80=D0=B6=D0=BA=D0=B8=20=D0=B0=D1=81?= =?UTF-8?q?=D0=BF=D0=B5=D0=BA=D1=82=D0=BD=D0=BE=D0=B3=D0=BE=20=D0=BF=D1=80?= =?UTF-8?q?=D0=BE=D0=B3=D1=80=D0=B0=D0=BC=D0=BC=D0=B8=D1=80=D0=BE=D0=B2?= =?UTF-8?q?=D0=B0=D0=BD=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/aop/AspectKernel.php | 13 +++++++++++++ api/web/index.php | 23 ++++++++++++++++++++--- composer.json | 9 ++++++++- 3 files changed, 41 insertions(+), 4 deletions(-) create mode 100644 api/aop/AspectKernel.php diff --git a/api/aop/AspectKernel.php b/api/aop/AspectKernel.php new file mode 100644 index 0000000..c003331 --- /dev/null +++ b/api/aop/AspectKernel.php @@ -0,0 +1,13 @@ +init([ + 'debug' => YII_DEBUG, + 'appDir' => __DIR__ . '/../../', + 'cacheDir' => __DIR__ . '/../runtime/aspect', + 'excludePaths' => [ + __DIR__ . '/../runtime/aspect', + __DIR__ . '/../../vendor', + ], +]); + require __DIR__ . '/../../vendor/yiisoft/yii2/Yii.php'; +spl_autoload_unregister(['Yii', 'autoload']); require __DIR__ . '/../../common/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(); diff --git a/composer.json b/composer.json index fb033f1..975a12c 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,9 @@ "spomky-labs/otphp": "^9.0.2", "bacon/bacon-qr-code": "^1.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": { "yiisoft/yii2-debug": "*", @@ -51,6 +53,11 @@ } ], "autoload": { + "psr-4": { + "api\\": "api", + "common\\": "common", + "console\\": "console" + }, "files": [ "common/consts.php" ]