What is the disadvantage of using abstract class as a database connectivity in zend framework 2 instead of service locator
- by arslaan ejaz
If I use database by creating adapter with drivers, initialize it in some abstract class and extend that abstract class to required model. Then use simple query statement. Like this:
namespace My-Model\Model\DB;
abstract class MysqliDB {
protected $adapter;
public function __construct(){
$this->adapter = new…