Edit report at https://bugs.php.net/bug.php?id=56621&edit=1
ID: 56621 Updated by: sebast...@php.net Reported by: sebast...@php.net Summary: Functionality to make a class inerit a class / implement an interface -Status: Open +Status: Closed Type: Feature/Change Request Package: runkit Operating System: Irrelevant PHP Version: 5_1 CVS-2005-10-29 (dev) -Assigned To: +Assigned To: sebastian Block user comment: N Private report: N Previous Comments: ------------------------------------------------------------------------ [2005-10-29 17:13:28] poll...@php.net http://www.php.net/runkit_class_adopt Implementing interfaces can go on the to-do though... ------------------------------------------------------------------------ [2005-10-29 02:06:44] sebast...@php.net Description: ------------ Two new functions that make a class inherit from another class (if it does not have a parent class, yet) and implement an interface (if it implements the required methods), respectively, would be nice. Reproduce code: --------------- <?php class ParentClass {} class ChildClass {} runkit_inherit_class('ChildClass', 'ParentClass'); interface I {public function doSomething();} class C {public function doSomething() {}} runkit_implement_interface('C', 'I'); ?> Expected result: ---------------- <?php class ChildClass extends ParentClass {} class C implements I {public function doSomething() {}} ?> ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=56621&edit=1