PHP Classes

File: readme.txt

Recommend this page to a friend!
  Classes of Artur Graniszewski  >  Advanced Sourcecode Reflection in PHP  >  readme.txt  >  Download  
File: readme.txt
Role: Documentation
Content type: text/plain
Description: Documentation
Class: Advanced Sourcecode Reflection in PHP
Retrieve extended class reflection information
Author: By
Last change: Reformated
Date: 11 years ago
Size: 1,240 bytes


Class file image Download
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:

namespace A\B;

class Foo { public $test; }

$function = new \System\Reflection\AdvancedReflectionClass('A\\B\\Foo');



See examples files for futher info.
For more information send a message to info at phpclasses dot org.