Re: DB, MDB2, PDO - Future of DB-Abstraction in PEAR
| From: | Lukas Smith | Date: | Thu, 04 Aug 2005 00:12:13 +0000 |
| Subject: | Re: DB, MDB2, PDO - Future of DB-Abstraction in PEAR | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-39190@lists.php.net to get a copy of this message | ||
Andreas Korthaus wrote:
Exactly. This is exactly where a factory is the way to go. regards, LukasI just want to make it clear, its not possible to *extend* the main PDO object easily, because the PDO::__construct() method is marked final, you cannot set your own constructor - the reasoning being that if you extend it, and fail to call parent::__construct() in your class, it causes a segfault. I personally feel this was a kludge fix. Oh well, __call() is my friend.But it's not very difficult to use a factory methode or something like that. I don't need to add anything to the constructor.