php.net |  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
Votes:7
Avg. Score:4.0 ± 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
Description:
------------
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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-01-01 22:49 UTC] jani@php.net
-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: *
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Thu Dec 12 17:01:24 2019 UTC