php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #53779 New class ReflectionConstant along the lines of ReflectionProperty
Submitted: 2011-01-18 16:55 UTC Modified: 2015-08-31 20:48 UTC
Votes:5
Avg. Score:4.8 ± 0.4
Reproduced:5 of 5 (100.0%)
Same Version:1 (20.0%)
Same OS:2 (40.0%)
From: RQuadling at GMail dot com Assigned: cmb (profile)
Status: Duplicate Package: Reflection related
PHP Version: 5.3SVN-2011-01-18 (SVN) OS: Irrelevant
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: RQuadling at GMail dot com
New email:
PHP Version: OS:

 

 [2011-01-18 16:55 UTC] RQuadling at GMail dot com
Description:
------------
Using ReflectionClass->getConstants() returns all constants defined in the class 
tree as a simple array, irrespective of the defining class.

In comparison to that ReflectionClass->getProperties() returns a collection of 
ReflectionProperty, allowing you to filter the find the properties for a single 
class.

So, would it be possible to have a similar mechanism for constants, replacing the 
simplistic array with a collection of RefelctionConstant.




Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-01-29 02:47 UTC] felipe@php.net
More related ideas in bug #45569
 [2015-08-31 20:48 UTC] cmb@php.net
-Status: Open +Status: Duplicate -Assigned To: +Assigned To: cmb
 [2015-08-31 20:48 UTC] cmb@php.net
This is actually a duplicate of request #45569, after
ReflectionParameter::getType() has already been implemented.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 17:01:29 2024 UTC