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:8
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
 [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

Pull Requests

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: *
 [2020-02-18 05:58 UTC] carusogabriel@php.net
Related to Request #42360.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 30 14:01:28 2024 UTC