https://github.com/jonesiscoding/php-reflection
Library that adds additional Reflection style classes, with additional functionality for PHP 7.0
https://github.com/jonesiscoding/php-reflection
Last synced: 7 days ago
JSON representation
Library that adds additional Reflection style classes, with additional functionality for PHP 7.0
- Host: GitHub
- URL: https://github.com/jonesiscoding/php-reflection
- Owner: jonesiscoding
- License: lgpl-2.1
- Created: 2026-01-09T19:29:34.000Z (18 days ago)
- Default Branch: main
- Last Pushed: 2026-01-13T14:41:52.000Z (14 days ago)
- Last Synced: 2026-01-13T17:10:38.797Z (14 days ago)
- Language: PHP
- Homepage:
- Size: 37.1 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# php-reflection
Library that adds additional Reflection-style classes, with additional functionality for PHP 7.0
## ReflectionComment Classes
Parses the contents of a comment retrieved from a function, property or class. Each source type has a specific class
which can be used to parse and retrieve individual tags from the PHPdoc comment.
Tags are returned as a `ReflectionTag`. In cases where tags may repeat such as `@property`, `@method` or `@param`, a
`TagBag` is returned.
## ReflectionVar Classes
Similar to ReflectionType, this class provides information on a type, such as a property type, parameter type, or method
return type. Unlike ReflectionType, the data for a ReflectionVar can be pulled from the DocComment of the related
reflection object.
Multiple types are presented as a `ReflectionUnionVar`, and singular types are presented as a `ReflectionNamedVar`, in
the same manner as PHP 7.1+.
In cases where a PHPdoc indicates an array of a specific type, a `ReflectionPrototypeVar` is used to indicate this.
## ReflectionTag Classes
These classes are used internally to represent a tag from a `ReflectionComment`.
## Other Classes
### ReflectionClassImports
This class parases the `use` statements above the class declaration in a class, in order to resolve types referred to
by short names in PHPdoc comments.
### ReflectionConstructor
This class provides insight into a class constructor, allowing for instantiation via an array of named arguments.
### ReflectionName
This class provides manipulation of class, method, and property names, allowing for easy generation of method names
from property names, and vice versa.
### ReflectionAccess
This class provides basic information about wether a property is accessible within a class, whether directly or through
a getter and/or setter.