Skip to content

Commit

Permalink
Framework update v2.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
DesignByMalina committed Mar 21, 2024
1 parent 3a283b7 commit 2dd8a89
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 11 deletions.
1 change: 0 additions & 1 deletion application/classes/BaseController.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

class BaseController extends TemplateEngine implements BaseInterface
{
public $translation;
private $database;

public function __construct(DatabaseInterface $database)
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/LoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function __construct(DatabaseInterface $database)
{
parent::__construct($database);

$model = new LoginModel($database);
$model = new LoginModel($database, $this->translation);
$this->model = $model;
}

Expand Down
2 changes: 1 addition & 1 deletion src/Controller/RegisterController.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function __construct(DatabaseInterface $database)
{
parent::__construct($database);

$model = new RegisterModel($database);
$model = new RegisterModel($database, $this->translation);
$this->model = $model;
}

Expand Down
6 changes: 2 additions & 4 deletions src/Model/LoginModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

namespace App\Model;

use Dbm\Classes\Translation;
use Dbm\Interfaces\DatabaseInterface;
use Dbm\Interfaces\TranslationInterface;

class LoginModel
{
Expand All @@ -20,11 +20,9 @@ class LoginModel
private $database;
private $translation;

public function __construct(DatabaseInterface $database)
public function __construct(DatabaseInterface $database, TranslationInterface $translation)
{
$this->database = $database;

$translation = new Translation();
$this->translation = $translation;
}

Expand Down
6 changes: 2 additions & 4 deletions src/Model/RegisterModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,17 @@

namespace App\Model;

use Dbm\Classes\Translation;
use Dbm\Interfaces\DatabaseInterface;
use Dbm\Interfaces\TranslationInterface;

class RegisterModel
{
private $database;
private $translation;

public function __construct(DatabaseInterface $database)
public function __construct(DatabaseInterface $database, TranslationInterface $translation)
{
$this->database = $database;

$translation = new Translation();
$this->translation = $translation;
}

Expand Down

0 comments on commit 2dd8a89

Please sign in to comment.