20240412#1

This commit is contained in:
User
2024-04-12 03:18:04 +03:00
parent 035783e264
commit c2d2ad9177
20 changed files with 292 additions and 50 deletions

View File

@@ -11,5 +11,5 @@ return [
MysqlStorageInterface::class => DI\create(MysqlStorage::class)->constructor(json_decode(getenv("MYSQL_PARAM"), true)),
SessionInterface::class => DI\create(Session::class)->constructor(),
CacheInterface::class => DI\create(Cache::class)->constructor("../var/cache"),
'App\*\Domain\Repository\*RepositoryInterface' => DI\autowire('App\*\Repository\Mysql\*Repository'),
'App\*\Domain\Repository\*Repository\*RepositoryInterface' => DI\autowire('App\*\Repository\Mysql\*Repository'),
];

View File

@@ -1,2 +1,2 @@
<?php
return (new \Rmphp\Content\Content('templates/base.tpl'))->setSubtemplePath('templates');
return (new \Rmphp\Content\Content('/templates/base.tpl'))->setSubtemplatePath('/templates');

View File

@@ -2,15 +2,14 @@
/**
* Правила для точек монтирования модулей
* Каждый массив определяет порядок срабатывания, часть url с которого
*/
# Example:
# ['key'=>'/', "action"=>"App\\Main\\Controllers\\IndexController", "method"=>"index"],
# ['key'=>'/', 'router'=>'config/routes/main/routes.php'],
# ['key'=>'/', 'router'=>'config/routes/main.yaml'],
# ['key'=>'/', 'router'=>[]],
return [
['key'=>'/', 'router'=>'config/routes/main.yaml'],
['key'=>'/', 'router'=>'config/routes/main/routes.php'],
];

View File

@@ -1,12 +0,0 @@
- key: "/"
routes:
- action: "App\\Main\\Controllers\\IndexController"
method: "index"
params: ""
# Empty
- key: "[any]"
routes:
- action: "App\\Main\\Controllers\\IndexController"
method: "emptyAction"
params: ""

View File

@@ -6,7 +6,7 @@
params: ""
# Empty
- key: "[any]"
- key: "<@any>"
routes:
- action: "App\\Main\\Controllers\\IndexController"
method: "emptyAction"