From 49760a09bf6a75c55ae6ca3db96512c0d6dcaf59 Mon Sep 17 00:00:00 2001 From: Sieciech Date: Fri, 26 Feb 2021 22:08:57 +0100 Subject: [PATCH] yghhg --- index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index 7e266d9..e1cd0cf 100644 --- a/index.php +++ b/index.php @@ -7,7 +7,7 @@ interface ISqlBase { //public function Delete(): string; } -class BaseModel { +abstract class BaseModel { protected $sql; public function __construct(ISqlBase $sql) { @@ -15,7 +15,7 @@ class BaseModel { } public static function Get(int $id) { - return self::class; + return get_class($this); $stmt = $pdo->prepare('SELECT id, name FROM users WHERE id=?'); $stmt->execute([$id]); return $stmt->fetchObject(__CLASS__);