Compare commits

..

No commits in common. "66040d69db0e631302559b9be732181c732d7a40" and "6cb90d5ea2f74caa15f40e47907e7a5be38e7797" have entirely different histories.

2 changed files with 10 additions and 3 deletions

View File

@ -29,6 +29,13 @@ class Mail
{ {
$this->body = file_get_contents(ROOT . '/mail/' . $template . '.html'); $this->body = file_get_contents(ROOT . '/mail/' . $template . '.html');
$baseParameters = [
'APP_NAME' => $_ENV['APP_NAME'],
'BASE_URL' => $_ENV['APP_URL'],
];
$params = array_merge($baseParameters, $params);
foreach ($params as $key => $param) { foreach ($params as $key => $param) {
$this->body = str_replace('{{' . $key . '}}', $param, $this->body); $this->body = str_replace('{{' . $key . '}}', $param, $this->body);
} }

View File

@ -6,12 +6,12 @@ use SokoWeb\Interfaces\Response\IRedirect;
use SokoWeb\Interfaces\Response\IContent; use SokoWeb\Interfaces\Response\IContent;
use SokoWeb\Interfaces\Authentication\IAuthenticationRequired; use SokoWeb\Interfaces\Authentication\IAuthenticationRequired;
use SokoWeb\Interfaces\Authorization\ISecured; use SokoWeb\Interfaces\Authorization\ISecured;
use SokoWeb\Interfaces\Routing\IRouteCollection;
use SokoWeb\Interfaces\Database\IConnection; use SokoWeb\Interfaces\Database\IConnection;
use SokoWeb\Interfaces\Request\IRequest; use SokoWeb\Interfaces\Request\IRequest;
use SokoWeb\Response\Redirect; use SokoWeb\Response\Redirect;
use SokoWeb\Response\HtmlContent; use SokoWeb\Response\HtmlContent;
use SokoWeb\Response\JsonContent; use SokoWeb\Response\JsonContent;
use SokoWeb\Routing\RouteCollection;
class HttpResponse class HttpResponse
{ {
@ -19,7 +19,7 @@ class HttpResponse
private IConnection $dbConnection; private IConnection $dbConnection;
private IRouteCollection $routeCollection; private RouteCollection $routeCollection;
private array $appConfig; private array $appConfig;
@ -32,7 +32,7 @@ class HttpResponse
public function __construct( public function __construct(
IRequest $request, IRequest $request,
IConnection $dbConnection, IConnection $dbConnection,
IRouteCollection $routeCollection, RouteCollection $routeCollection,
array $appConfig, array $appConfig,
string $requestMethod, string $requestMethod,
string $requestUrl string $requestUrl