On 4/21/16 10:43 AM, Rowan Collins wrote:
guilhermebla...@gmail.com wrote on 21/04/2016 16:25:
I understand others mentioned we could create a new interface that
wraps the other two interfaces, but that still doesn't solve the
problem where I want to extend a class AND also implement a specific
interface.
I covered this case in my previous mail: you can create an abstract
class that extends a concrete class and adds an interface to it, and
the extra methods are implicitly added as abstract for descendants to
implement:
Creating a one off class or interface to handle intersection cases works
iff you control all creation points for all objects that you may
encounter. That is rarely the case when dealing with 3rd party
libraries, as is now typical.
--
--Larry Garfield
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php