Recommend this page to a friend! |
![]() ![]() |
Info | ![]() |
![]() |
![]() ![]() |
Reputation | Support forum (1) | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2011-03-21 (5 years ago) ![]() | ![]() ![]() ![]() ![]() | Total: 849 | All time: 3,938 This week: 1,045![]() |
Version | License | PHP version | Categories | |||
advanced-reflection 1.0.0 | GNU Lesser Genera... | 5.2.2 | PHP 5, Language |
Description | Author | |||
This package can retrieve extended reflection information on classes or functions. Innovation Award
|
To use this library simplycreate instances of: * AdvancedReflectionClass, * AdvancedReflectionMethod, * AdvancedReflectionFunction, These are extending the ReflectionClass, ReflectionMethod and ReflectionFunction built in the PHP 5.x, so they are equipped with all the methods from the original Reflection PHP mechanism and additional ones: * getBody() returns source code (string) containing main body of the class/method/function * getDeclaration() returns source code (string) containing entire declaration of the class/method/function * getStartColumn() returns starting column number (integer) of the class/method/function in the starting line of code (getStartLine()). * getStartPosition() returns position (integer) of the first character of the class/method/function in the sourcecode file Example taken from the PHP manual and modified for this library: <?php namespace A\B; class Foo { public $test; } $function = new \System\Reflection\AdvancedReflectionClass('A\\B\\Foo'); var_dump($function->inNamespace()); var_dump($function->getName()); var_dump($function->getNamespaceName()); var_dump($function->getDeclaration()); ?> See examples files for futher info. |
Screenshots | ||
![]() |
File | Role | Description |
---|---|---|
![]() |
Class | Main class (PHP 5.3+ only) |
![]() |
Class | Main class (PHP 5.2+) |
![]() ![]() |
Example | Example #1 (PHP 5.3+ only) |
![]() ![]() |
Example | Example #2 (PHP 5.2+) |
![]() ![]() |
Lic. | LGPL license |
![]() ![]() |
Doc. | Documentation |
![]() | advanced-reflection-2011-03-21.zip 33KB |
![]() | advanced-reflection-2011-03-21.tar.gz 29KB |
![]() | Install with Composer |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
0% |
|
|
User Ratings | ||||||||||||||||||||||||||||||
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.
Related pages |
Project homepage Technical description of this class (polish version) |
Reflection in PHP Documentation found in the php.net manual |
Reflection Definition Definition found on Wikipedia |
PHP Tokens Description of the parsing mechanism used by this class |