Download the PHP package bulton-fr/methods-header-generator without Composer
On this page you can find all versions of the php package bulton-fr/methods-header-generator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download bulton-fr/methods-header-generator
More information about bulton-fr/methods-header-generator
Files in bulton-fr/methods-header-generator
Package methods-header-generator
Short Description Generate the header of all methods into a PHP classes.
License LGPL-3.0
Homepage https://github.com/bulton-fr/methods-header-generator
Informations about the package methods-header-generator
methods-header-generator
Generate methods struct for all classes of a project. Can be used like help to write documentation.
Install
With composer
composer require bulton-fr/methods-header-generator
Because dependency phpdocumentor/reflection-common
in 2.0.0-beta1
, you should have PHP >= 7.1
I will see if I can doing anything to allow PHP 5.x versions.
Use it
With ProjectParser class
This class will take all classes declared into your composer project, and inspect her. The other function of this class is to save all class already parsed to avoid to re-parse it again if another class extend it (for exemple).
About composer, it should have the classmap generated. So you should use the option -o
when you install or update your composer project.
Exemple : composer update -o
To use ProjectParser :
The constructor take three parameters:
$vendorDir
The path to the vendor dir$nsToParse
An array of all namespace to parse$nsToIgnore
An array of all namespace to ignore
Exemple with my BFW project:
I create the file : /docs/parser.php
I ask to ProjectParse to generate the structure for classes with a namespace started by \BFW\
, but to ignore all classes with a namespace who started by \BFW\Test
to not have my unit test classes inspected.
Without ProjectParser class
Without ProjectParser, you will loop on all your classes manually. For each class, you will instantiate ClassParser and take him the class name you want to inspect, with the namespace.
Exemple:
What is returned ?
If I use ClassParser on the class ProjectParser, it will return :
All versions of methods-header-generator with dependencies
phpdocumentor/reflection-docblock Version ^5.0
phpdocumentor/type-resolver Version ^0.6