|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #56621 Functionality to make a class inerit a class / implement an interface
Submitted: 2005-10-29 02:06 UTC Modified: 2011-10-27 07:16 UTC
From: Assigned: sebastian (profile)
Status: Closed Package: runkit (PECL)
PHP Version: 5_1 CVS-2005-10-29 (dev) OS: Irrelevant
Private report: No CVE-ID: None
 [2005-10-29 02:06 UTC]
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:
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:
class ChildClass extends ParentClass {}
class C implements I {public function doSomething() {}}


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-10-29 17:13 UTC]

Implementing interfaces can go on the to-do though...
 [2011-10-27 07:16 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: sebastian
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Mar 02 20:01:29 2024 UTC