Download the PHP package scaleupstack/reflection without Composer
On this page you can find all versions of the php package scaleupstack/reflection. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download scaleupstack/reflection
More information about scaleupstack/reflection
Files in scaleupstack/reflection
Package reflection
Short Description A performance-improved and convenient way to deal with PHP Reflection.
License BSD-3-Clause
Informations about the package reflection
ScaleUpStack/Reflection
This library provides a performance-improved, and convenient way to deal with PHP Reflection classes.
-
Performance: Reflection is slow if you instantiate it continuously. If you rely on reflection heavily to inspect the same type of classes in one request over and over again, then caching of the created Reflection classes helps a lot.
-
Convenience: Instead of dealing with the object graph of Reflection classes, a facade offers convenient methods to
- retrieve PHP Reflection classes,
- getting/setting static and non-static properties of an object or class,
- invoking static and non-static methods of an object or class.
Installation
Use Composer to install this library:
Usage
The public API of this package is available via the ScaleUpStack\Reflection\Reflection
class. All methods of the Reflection
class are static. (In fact, it is not possible to instantiate it.)
-
Namespace
-
Methods to retrieve PHP Reflection objects via class name or object:
Please note that
classByObject()
returns a\ReflectionClass
and not a\ReflectionObject
. -
Methods to access static and non-static properties:
- Methods to invoke static and non-static methods:
Current State
This library is stable.
Handling of some Reflection features that could (perhaps?) benefit from caching (e.g. getting the parent class) are not implemented yet. But I do not strive for completeness. If you are missing some features, just create a pull request or ask for it, explaining your context/needs.
Contribute
Thanks that you want to contribute to ScaleUpStack/Reflection.
-
Report any bugs or issues on the issue tracker.
- Get the source code from the Git repository.
License
Please check LICENSE.md in the root dir of this package.
Copyright
ScaleUpVentures Gmbh, Germany
Thomas Nunninger thomas.nunninger@scaleupventures.com
www.scaleupventures.com