Skip to content

Commit ee9eda3

Browse files
committed
Move DbModel.php and UserModel.php in db subnamespace
1 parent 2ad959a commit ee9eda3

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

core/Application.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
namespace app\core;
99

10+
use app\core\db\Database;
11+
1012
/**
1113
* Class Application
1214
*
@@ -26,7 +28,7 @@ class Application
2628
public Database $db;
2729
public Session $session;
2830
public View $view;
29-
public ?DbModel $user;
31+
public ?UserModel $user;
3032

3133
public function __construct($rootDir, $config)
3234
{
@@ -53,7 +55,7 @@ public static function isGuest()
5355
return !self::$app->user;
5456
}
5557

56-
public function login(DbModel $user)
58+
public function login(UserModel $user)
5759
{
5860
$this->user = $user;
5961
$primaryKey = $user->primaryKey();

core/UserModel.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
namespace app\core;
99

10+
use app\core\db\DbModel;
1011

1112
/**
1213
* Class UserModel

core/Database.php renamed to core/db/Database.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Time: 8:09 AM
66
*/
77

8-
namespace app\core;
8+
namespace app\core\db;
99

1010

1111
/**

core/DbModel.php renamed to core/db/DbModel.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@
55
* Time: 9:19 AM
66
*/
77

8-
namespace app\core;
8+
namespace app\core\db;
99

10+
use app\core\Application;
11+
use app\core\Model;
1012

1113
/**
1214
* Class DbModel

0 commit comments

Comments
 (0)