Download the PHP package nette/reflection without Composer
On this page you can find all versions of the php package nette/reflection. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nette/reflection
More information about nette/reflection
Files in nette/reflection
Package reflection
Short Description Nette Reflection: docblock annotations parser and common reflection classes
License BSD-3-Clause GPL-2.0 GPL-3.0
Homepage https://nette.org
Informations about the package reflection
Nette PHP Reflection
Install it using Composer:
The last stable release requires PHP version 5.6 or newer (is compatible with PHP 7.0 and 7.1).
If you like Nette, please make a donation now. Thank you!
If you need to find every information about any class, reflection is the right tool to do it. You can easily find out which methods does any class have, what parameters do those methods accept, etc.
Annotations
Reflection has really a lot to do with annotations. The annotations are written into phpDoc comments (two opening asterisks are mandatory!) and start with @
. You can annotate classes, variables and methods:
In the code there are these annotations:
@author John Doe
- string, contains text value'John Doe'
@Persistent
- boolean, its presence meanstrue
@User(loggedIn, role=Admin)
- contains associativearray('loggedIn', 'role' => 'Admin')
The existence of a class annotation can be checked via hasAnnotation()
method:
Values can be acquired with getAnnotation()
:
.[caution] Previous definitions are overwritten with the latter ones, sou you will always get the last one.
All annotations can be obtained with getAnnotations()
:
All versions of reflection with dependencies
ext-tokenizer Version *
nette/caching Version ^2.2 || ^3.0
nette/utils Version ^2.4 || ^3.0