Req #56621 [Opn->Csd]: Functionality to make a class inerit a class / implement an interface

From: Date: Thu, 27 Oct 2011 07:16:46 +0000
Subject: Req #56621 [Opn->Csd]: Functionality to make a class inerit a class / implement an interface
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-164604@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=56621&edit=1 ID: 56621 Updated by: sebastian@php.net Reported by: sebastian@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] pollita@php.net http://www.php.net/runkit_class_adopt Implementing interfaces can go on the to-do though... ------------------------------------------------------------------------ [2005-10-29 02:06:44] sebastian@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

« previous php.bugs (#164604) next »