Skip to content

simple php markdown document generator from clases.. this is a take of other proyect and improvement for CI and Guachi first attempt

License

Notifications You must be signed in to change notification settings

venenux/php-simple-docmarkdowngen

Repository files navigation

php-simple-docmarkdowngen

Simple php markdown document generator from clases.. is a take of improvement for CI and Guachi first attempt .

Based and forked directly from Marco Cesarato's PHP Class Markdown Documentation

YEAH!: hosted at Gitlab baby!

Description

Convert primitives PHPDoc comments from classes into Markdown.

By parsing a class file with a given file name and extracts the documentation of its functions and variables that it but in primitive PHPDoc format, then convert the extracted documentation into a file in Markdown format.

Example

See documentation below in documentation section.

Usage

php -r "include 'ClassMarkdown.php';ClassMarkdown::printMarkdown('ClassMarkdown.php');"

Output Text

## CoreClass

**CoreClass, version 0.1**: Class core for all framework user base code

Copyright (c) 2018, 2019

*   PICCORO Lenz McKAY <mckaygerhard@gmail.com>

| Method        | Description                                        | Type   | Parameters                                         | Return         |
| ------------- | -------------------------------------------------- | ------ | -------------------------------------------------- | -------------- |
| __construct   | Constructor                                        | public |                                                    | void           |
| add_request   | Add Ajax request                                   |        | $name<br>$request<br>bool $public                  | bool           |
| fetch         |                                                    |        | $what<br>null $operators                           | array          |

Documentaton

ClassMarkdown

ClassMarkdown, version 0.1.10 (2019-04-05): class implementation to output markdown text from class

Copyright (c) 2018, 2019

Method Description Type Parameters Return
__construct ClassMarkdown constructor public none void
parseClass a given class funtions as array keys protected
static
$class array
parseExtended a given class tags as markdown formated paragraph protected
static
$class string
getMarkdown Get markdown class documentation public
static
$file string
printMarkdown Print Markdown class documentation public
static
$file void
getArray Get PHP file as array class documentation public
static
$file array

ClassParser

**ClassParser, **: Class ClassParser

(c) 2019

Method Description Type Parameters Return
getClasses public array
getClassesImplementing public $interface array
getClassesExtending public $class array
parse public $file void

TextTable

TextTable, version 1.00 (2014-04-04): Creates a markdown table based on the parsed documentat

(c) 2019

Method Description Type Parameters Return
__construct can init the default values to markdown text table
public array $header The header array [key => label, ]
array $content Content table as matrix of tags funtions
array $align Alignment optios [key => L|R|C, ]
void
setAlgin Overwrite the alignment array
public array $align Alignment optios [key => L|R|C, ] void
addData Add data to the table from matrix array tags class
public array $content Content matrix of tags class class self object class with data content populated
renderDelimiter Add a delimiter based on aling of the class setted
private string
renderRow Render a single row for markdown table
private array $row string
render Render the table text as markdown
public array $content Additional table content string

Copyright (c) 2018, 2019

See LICENSE

YEAH!: hosted at Gitlab baby!

About

simple php markdown document generator from clases.. this is a take of other proyect and improvement for CI and Guachi first attempt

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages