Re: [RFC][DISCUSSION] ReflectionParameter::getClassName()
| From: | Matteo Beccati | Date: | Sat, 31 Jan 2015 08:12:49 +0000 |
| Subject: | Re: [RFC][DISCUSSION] ReflectionParameter::getClassName() | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-81471@lists.php.net to get a copy of this message | ||
Hi Phil,
On 31/01/2015 05:14, Philip Sturgeon wrote:
This RFC adds a new method to ReflectionParameter to allow easy access to a class name in a type hint, avoiding the need to actually load the class and useLooks good to me! Just a couple of minor things. 1) The RFC does not mention what happens if the parameter is not type hinted, or what happens when hints are namespaced and/or use clauses are used. 2) There's a tiny bit of overlap with "scalar type hints", if it is accepted (in any form) and reflection support added to it. Depending on the way such reflection support is implemented, the method proposed here could be a perfect match. Or perhaps it could be in the way. Cheers -- Matteo Beccati Development & Consulting - http://www.beccati.com/get_class()or::class. https://wiki.php.net/rfc/reflectionparameter-getclassname