private $db;
private $table;
public function __construct(Database $db)
{
$this->db = $db->getInstance();
$this->table = getenv('NEWS_DB_TABLE');
}
<PDO-based methods>
}
in three classes with slightly different names of table and class, so: is it correct to put it into abstract class? Or I misunderstand it's purpose?
You can put define the abstract class and methods and then extend this class from your abstract, abstract class and method cannot be instantiated and shouldn't not contain implementation, only guidelines and signatures
Обсуждают сегодня