phpdoc-md
phpdoc-md copied to clipboard
Add twig and parse logic for autoloaded files
Details
You can autoload in files via composer:
"autoload": {
"files": [
"src/helpers/api.php",
"src/helpers/common.php",
"src/helpers/core.php",
"src/helpers/debug.php",
"src/helpers/helpers.php",
"src/helpers/request.php"
]
}
I've created a simple example of one function definition from my generated structure.xml in a gist: https://gist.github.com/ericdowell/6ed8626fac341a213128
Todo
-
[x] Create method
getFunctionDefintions. Will be similar to whatgetClassDefinitionsdoes.foreach ($xml->xpath('file/function') as $function) { //Collect function definition and push into array } -
[x] Create similar
expandProperties/parseProperties/expandMethodsmethods for functions. e.g.expandFunctionProperties($filename)/expandFunctionsInFile($filename)/parseFunctionProperties(SimpleXMLElement $file) -
[x] Create
function.twigto output function documentation.
Note
I wouldn't mind taking a stab at this addition to the library when my free time permits.