Re: [Request][Discussion] Introduce interfaces PDOInterface and PDOStatementInterface

From: Date: Mon, 31 Jul 2017 11:59:02 +0000
Subject: Re: [Request][Discussion] Introduce interfaces PDOInterface and PDOStatementInterface
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-100136@lists.php.net to get a copy of this message
On 31 July 2017 at 12:49, Andrew Nester <newaltgroup@bk.ru> wrote: > > To make it possible to have persistent PDO with custom PDOStatement you > should have: > > 1) custom CustomPDO implements PDOInterface which will be > somewhat proxy to PDO instance > 2) custom CustomPDOStatement implements > PDOStatementInterface... "I think you should be more explicit here between steps one and two. http://www.sciencecartoonsplus.com/pages/gallery.php I'm not saying that's not going to work......I'm saying you should try to make a working example, to show that it works. That PDO with persistent connections doesn't support ATTR_STATEMENT_CLASS hints that it is doing some magic internally. Working around that magic in userland, while preserving the persistent connection functionality might be 'non-trivial'. Actually, there should be tests for that functionality as part of the PR, probably. cheers Dan

« previous php.internals (#100136) next »