contao/import — Issue #3452: Extendable Database class
Author: importer
Created: 2011-11-29 21:36:25+00:00
State: open
Labels: Feature, framework

Hei hei Leo.

In Contao's context Database is a singleton.

Additionally to the private constructor and the factory method getInstance() you are using a constant to call the derived class's methods.

Could you please use a instance variable $this->objDbDriver instead, so that extending the Database class is possible?

Namely I need this for my extension OtherDatabase, which is offering a factory for additional Database objects for external (or just other) databases. (Still singleton, but per database connection).

It already works, but only with the same dbDriver, since there's the constant.

In the Zend Framework they are also using instance variables to call derived class's methods.

--- _Originally created by andypillip on September 9th, 2011, at 03:55pm (ID 3452)_