>  I am simply suggesting an alternative to using Reflection whereas:
>>
>> get_class_constants([object|**string]);
>> get_object_constants([object])**;
>>
>> Do we need both; probably not; the first would likely do.
>>
>
> +1 for the first one only
>
>
> Am 27.02.2013 16:12, Analyst (Frank Schenk) trolled:
>
>  bitmask class to shuffle around with class constants
>>
>
> shuffle bits around with clearly named constants:
> http://php.net/manual/en/**language.operators.bitwise.php<http://php.net/manual/en/language.operators.bitwise.php>
> https://github.com/symfony/**symfony/blob/master/src/**
> Symfony/Component/Security/**Acl/Permission/MaskBuilder.php<https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Security/Acl/Permission/MaskBuilder.php>


This part of the example shows this in practice:
https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Security/Acl/Permission/MaskBuilder.php#L192

You can see where it is using the reflection class to grab constants.
 These are the types of use cases where this becomes useful; now depending
on how many times this is done in a code base really depends on how useful
the function is over using the reflection class itself.

- Mike

Reply via email to