Skip to content

Add twig and parse logic for autoloaded files #12

@ericdowell

Description

@ericdowell

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

  • Create method getFunctionDefintions. Will be similar to what getClassDefinitions does.

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

  • 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions