Re: DB, MDB2, PDO - Future of DB-Abstraction in PEAR

From: 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:
I 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.
Exactly. This is exactly where a factory is the way to go. regards, Lukas

« previous php.pear.dev (#39190) next »