|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #49176 Add optional namespace parameter to get_declared_classes()
Submitted: 2009-08-06 11:23 UTC Modified: 2011-01-01 22:49 UTC
Avg. Score:3.9 ± 1.1
Reproduced:6 of 6 (100.0%)
Same Version:5 (83.3%)
Same OS:4 (66.7%)
From: robert dot de dot wilde at online dot nl Assigned:
Status: Open Package: Scripting Engine problem
PHP Version: * OS: *
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2009-08-06 11:23 UTC] robert dot de dot wilde at online dot nl
It would be nice to have an additional argument (string, defaults to '\') to 'get_declared_classes' to only return the classes inside a certain namespace. An second argument (bool, defaults to false) could be optional to ask if resolution should be recursive to subnamespaces.

Reproduce code:
Would be something defined as being:

get_declared_namespaces( String $sNamespace = '\', Bool $bRecursive = false);

Expected result:
List of classes in namespace.

Actual result:
List of all classes.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-01-01 22:49 UTC]
-Summary: get_declared_classes; Argument for namespace, default to \ +Summary: Add optional namespace parameter to get_declared_classes() -Package: Feature/Change Request +Package: Scripting Engine problem -Operating System: Linux +Operating System: * -PHP Version: 5.3.0 +PHP Version: *
 [2020-02-18 05:58 UTC]
Related to Request #42360.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Jul 22 16:01:29 2024 UTC