20240708#1

This commit is contained in:
User
2024-07-08 13:57:42 +03:00
parent 3ebbe07db6
commit c3e7bc6fc7
15 changed files with 22 additions and 18 deletions

View File

@@ -1,4 +1,4 @@
<?php
return (new \Rmphp\Content\Content('/application/src/Presentation/templates/base.tpl'))->setSubtemplatePath('/application/src/Presentation/templates/')->setSubtemplatePathAlias([
"main" => "/src/Main/Presentation/templates",
]);
return (new \Rmphp\Content\Content('/application/src/Infrastructure/templates/base.tpl'))->setSubtemplatePath('/application/src/Infrastructure/templates/')->setSubtemplatePathAlias([
"main" => "/src/Main/Infrastructure/templates",
]);

View File

@@ -1,13 +1,13 @@
# Index
- key: "/"
routes:
- action: "App\\Main\\Presentation\\Controllers\\IndexController"
- action: "App\\Main\\Infrastructure\\Controllers\\IndexController"
method: "index"
params: ""
# Empty
- key: "<@any>"
routes:
- action: "App\\Main\\Presentation\\Controllers\\IndexController"
- action: "App\\Main\\Infrastructure\\Controllers\\IndexController"
method: "emptyAction"
params: ""

View File

@@ -1,6 +1,6 @@
<?php
namespace Base\Presentation\Controllers;
namespace Base\Infrastructure\Controllers;
use Laminas\Diactoros\Response\HtmlResponse;
use Laminas\Diactoros\Response\JsonResponse;
@@ -146,4 +146,4 @@ abstract class AbstractController extends Main {
public function getTemplatePath(string $path) : string {
return $path;
}
}
}

View File

@@ -1,6 +1,6 @@
<?php
namespace Base\Presentation\Controllers;
namespace Base\Infrastructure\Controllers;
use Base\Application\ApplicationException;
use Base\Application\DTOException;
@@ -32,4 +32,4 @@ abstract class AbstractPageController extends AbstractController {
if($e instanceof DTOException || $e instanceof DomainException || $e instanceof ApplicationException) return $e->getMessage();
return "Ошибка. Дата и время: ".date("d-m-Y H:i:s");
}
}
}

View File

@@ -1,7 +1,7 @@
<?php
namespace Base\Presentation\Controllers;
namespace Base\Infrastructure\Controllers;
class NotFoundException extends \Exception {
}
}