Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:16278 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 9599 invoked by uid 1010); 18 May 2005 15:47:51 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 82516 invoked from network); 18 May 2005 15:38:50 -0000 Received: from unknown (HELO pb1.pair.com) (127.0.0.1) by localhost with SMTP; 18 May 2005 15:38:50 -0000 X-Host-Fingerprint: 64.233.184.207 wproxy.gmail.com Linux 2.4/2.6 Received: from ([64.233.184.207:34784] helo=wproxy.gmail.com) by pb1.pair.com (ecelerity 1.2 r(5656M)) with SMTP id 6B/4C-01538-7816B824 for ; Wed, 18 May 2005 11:38:47 -0400 Received: by wproxy.gmail.com with SMTP id 57so191949wri for ; Wed, 18 May 2005 08:38:43 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=nTFjy50wvyaflgiext3Kl2Vhn2yo+th64zN6v1nrtcPHGrsPPy4x5p4BO/39ieGCD3G76o/4tf83TZEReiGk15cGtpC468DDk0CeSKquixkpzANLd+aLCD0M3dP3NYkq5jD/kCKnU2p121wIL/d7enWDx+O3ucuiTpvTvRPC5W8= Received: by 10.54.69.16 with SMTP id r16mr380850wra; Wed, 18 May 2005 08:38:43 -0700 (PDT) Received: by 10.54.77.4 with HTTP; Wed, 18 May 2005 08:38:42 -0700 (PDT) Message-ID: <4e89b426050518083848d9a25@mail.gmail.com> Date: Wed, 18 May 2005 11:38:42 -0400 Reply-To: Wez Furlong To: Lukas Smith Cc: Nicholas Telford , internals@lists.php.net In-Reply-To: <428B40D7.8030903@php.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20050518132615.55570.qmail@lists.php.net> <428B40D7.8030903@php.net> Subject: Re: [PHP-DEV] Re: Allow PDO::query() to return a subclass of PDOStatement From: kingwez@gmail.com (Wez Furlong) Just like extending any other built-in class, you need to be careful to not override built-in methods that either exist now or may exist in the future; you can very easily burn yourself 6 months down the track this way. It's generally a bad idea, and definitely something to avoid if you are building a class library. You have now been warned that the traffic is dangerous; if you want to go play in it, it's your choice :-) --Wez. On 5/18/05, Lukas Smith wrote: > Nicholas Telford wrote: >=20 > > What I'm proposing is to allow PDO::query() to return a subclass of > > PDOStatement. This would allow abstractions to tailor the result set to > > their own needs while not (in theory) being too complicated to implemen= t. > > > > My initial idea involves passing an object that is a subclass of > > PDOStatement into PDO:query as a second parameter, then all that would > > be needed to get it to return a custom result set would be something > > like this: >=20 > http://oss.backendmedia.com/index.php?area=3DPDO&page=3DFAQ >=20 > read the last item over there. >=20 > Marcus (IIRC) is planning on making this less clumsy as right now you > have to repeatedly specifiy the statement class you want AFAIK. >=20 > regards, > Lukas >=20 > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >=20 >