NYCPHP Meetup

NYPHP.org

[nycphp-talk] Multi-Inheritance in PHP 5

csnyder chsnyder at gmail.com
Sun Oct 10 14:00:36 EDT 2004


> something in the middle would be nice, in both Java and PHP

One way to do this would be to allow the creation of new methods at runtime. 

Which you can, using the PECL extension ClassKit, *not bundled with PHP*:
http://www.php.net/manual/en/ref.classkit.php

ClassKit gives you:
bool classkit_method_copy ( string dClass, string dMethod, string
sClass [, string sMethod])

I have a lot of questions about this (as only just discovered it), but
it looks like a path to multiple inheritance. You could either make
these calls manually, inheriting just the methods you want, or write a
function that automatically merges one or more complete classes into
another class.



More information about the talk mailing list