phpdoc-md icon indicating copy to clipboard operation
phpdoc-md copied to clipboard

Add twig and parse logic for autoloaded files

Open ericdowell opened this issue 9 years ago • 0 comments

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 what getClassDefinitions does.

    foreach ($xml->xpath('file/function') as $function) {
      //Collect function definition and push into array
    }
    
  • [x] Create similar expandProperties/parseProperties/expandMethods methods for functions. e.g. expandFunctionProperties($filename)/expandFunctionsInFile($filename)/parseFunctionProperties(SimpleXMLElement $file)

  • [x] Create function.twig to output function documentation.

Note

I wouldn't mind taking a stab at this addition to the library when my free time permits.

ericdowell avatar Feb 11 '16 21:02 ericdowell