php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #42360 add paramets for get_declared_classes() - filter by parent class/interface
Submitted: 2007-08-21 13:13 UTC Modified: 2016-12-31 00:14 UTC
Votes:3
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: max at redline-software dot com Assigned:
Status: Open Package: Class/Object related
PHP Version: 5.2.3 OS:
Private report: No CVE-ID: None
 [2007-08-21 13:13 UTC] max at redline-software dot com
Description:
------------
The goal is to return all declared subclasses of given class_name/interface


Reproduce code:
---------------
interface A {}
class A1 implements A {}
class A2 implements A {}
class B extends A1 {}
class C {}

print_r(get_declared_classes('A'));
print_r(get_declared_classes('A1'));

Expected result:
----------------
// print_r(get_declared_classes('A'));
Array
(
    [0] => A1
    [1] => A2
    [2] => B
)

// print_r(get_declared_classes('A1'));
Array
(
    [2] => B
)


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-12-31 00:14 UTC] cmb@php.net
-Package: Feature/Change Request +Package: Class/Object related
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 30 14:01:28 2024 UTC