denchistyakov / reflection-php-doc-generator

PHP 5 class for generation php-doc's from reflection of user and internal classes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PHP 5 class for generation php-doc`s from reflection of users and internals classes.

Required:
PHP 5.2 and Zend Framework 1.9 or letter. Namespace «App_» must be appended to autoladed namespases:
in application.ini:
autoloadernamespaces.app = "App_"

or

in index.php or Bootstrap::_initAutoLoader():
$autoloader = Zend_Loader_Autoloader::getInstance();
$autoloader->registerNamespace('App_');

Example:
// Class initialization for generating php-doc for Imagick class
$generator = new App_CodeGenerator_PhpDoc_Class('Imagick');

// Set filters for properties and methods visibility
// show only public properties and public and protected methods
$generator->setPropertiesFilter(ReflectionProperty::IS_PUBLIC)
          ->setMethodsFilter(ReflectionProperty::IS_PUBLIC | ReflectionProperty::IS_PROTECTED);

// get generated php-doc as string and print
echo $generator->generate();

in plans unit tests

About

PHP 5 class for generation php-doc's from reflection of user and internal classes


Languages

Language:PHP 100.0%