Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add $filter parameter for ReflectionClass::(getConstants|getReflectionConstants) #5649

Closed
wants to merge 2 commits into from
Closed

Add $filter parameter for ReflectionClass::(getConstants|getReflectionConstants) #5649

wants to merge 2 commits into from

Conversation

carusogabriel
Copy link
Contributor

This solves #79628.

Similar to ReflectionClass::getMethods() and ReflectionClass::getProperties(),
this new $filter argument allows the filtering constants defined in a class by
their visibility.

For that, we create three new constants for ReflectionClassConstant:

  • IS_PUBLIC
  • IS_PROTECTED
  • IS_PRIVATE

cc @enumag

…nConstants)

This solves [#79628](https://bugs.php.net/79628).

Similar to `ReflectionClass::getMethods()` and `ReflectionClass::getProperties()`,
this new `$filter` argument allows the filtering of constants defined in a class by
their visibility.

For that, we create three new constants for `ReflectionClassConstant`:

  * `IS_PUBLIC`
  * `IS_PROTECTED`
  * `IS_PRIVATE`
@php-pulls php-pulls closed this in 7439941 Jun 7, 2020
@carusogabriel carusogabriel deleted the req79628/get-constants-with-filter branch June 7, 2020 13:59
@carusogabriel carusogabriel added this to the PHP 8.0 milestone Jun 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants