Compare commits
2 Commits
6cb90d5ea2
...
66040d69db
Author | SHA1 | Date | |
---|---|---|---|
66040d69db | |||
fc2de8e1ab |
@ -29,13 +29,6 @@ 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);
|
||||||
}
|
}
|
||||||
|
@ -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 RouteCollection $routeCollection;
|
private IRouteCollection $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,
|
||||||
RouteCollection $routeCollection,
|
IRouteCollection $routeCollection,
|
||||||
array $appConfig,
|
array $appConfig,
|
||||||
string $requestMethod,
|
string $requestMethod,
|
||||||
string $requestUrl
|
string $requestUrl
|
||||||
|
Loading…
Reference in New Issue
Block a user