PHP Classes
elePHPant
Icontem

PHP Class Documentation Generation to Markdown: Convert PHPDoc comments from classes into Markdown

Recommend this page to a friend!
  Info   View files View files (8)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2019-06-02 (3 months ago) RSS 2.0 feedNot enough user ratingsTotal: 105 All time: 9,171 This week: 344Up
Version License PHP version Categories
php-class-markdown-d 1.0Free for non-comm...5PHP 5, Utilities and Tools, Language, P...
Description Author

This package can convert PHPDoc comments from classes into Markdown.

It can parse a class file with a given file name and extracts the documentation of its functions and variables that it may contain in PHPDoc format.

The package can convert the extracted documentation into a file in Markdown format.

Innovation Award
PHP Programming Innovation award nominee
August 2018
Number 3
PHPDoc is a popular format for embedding documentation inside class files in the form of comments.

The documentation comments can be parsed and extract in order to generate documentation in different formats.

This package extracts documentation in PHPDoc format and generates human readable documentation in Markdown format, so it can be converted to other richer text formats later, like for instance HTML.

Manuel Lemos
  Performance   Level  
Name: Marco Cesarato is available for providing paid consulting. Contact Marco Cesarato .
Classes: 8 packages by
Country: Italy Italy
Age: 23
All time rank: 214684 in Italy Italy
Week rank: 4 Up1 in Italy Italy Up
Innovation award
Innovation award
Nominee: 1x

 

Details

PHP Class Markdown Documentation

Version: 0.1.10 beta

Github: https://github.com/marcocesarato/PHP-Class-Markdown-Docs

Author: Marco Cesarato

Description

This package can convert PHPDoc comments from classes into Markdown.

It can parse a class file with a given file name and extracts the documentation of its functions and variables that it may contain in PHPDoc format.

The package can convert the extracted documentation into a file in Markdown format.

Install

Composer

  1. Install composer
  2. Type composer require marcocesarato/markdown
  3. Enjoy

Methods

| Method | Description | Type | Parameters | Return | | ------------- | ---------------------------------- | ------------------- | ---------- | ------ | | getMarkdown | Get markdown class documentation | public<br>static | $file | string | | printMarkdown | Print Markdown class documentation | public<br>static | $file | | | getArray | Get php array class documentation | public<br>static | $file | array |

Example

Usage

Markdown::printMarkdown('Sample.php');

Output Text

## CoreClass
| Method        | Description                                        | Type   | Parameters                                         | Return         |
| ------------- | -------------------------------------------------- | ------ | -------------------------------------------------- | -------------- |
| __construct   | Constructor                                        | public |                                                    |                |
| __init        | Initialize                                         |        |                                                    | bool           |
| CoreClass     | Constructor                                        |        |                                                    |                |
| getInstance   | Get singleton instance                             |        |                                                    | CoreClass      |
| apply_filters | Apply module hook filters                          |        | $name<br>$data                                     | mixed          |
| do_action     | Do module hook actions                             |        | $name                                              | bool           |
| add_action    | Add module hook action                             |        | $name<br>$action                                   | bool           |
| add_filter    | Add module hook filter                             |        | $name<br>$filter                                   | bool           |
| add_request   | Add Ajax request                                   |        | $name<br>$request<br>bool $public                  | bool           |
| exists        | Check if element already exists if exists it will be updated on Save else it will be inserted |        | null $what<br>bool $undelete                       | bool           |
| prepare       | Prepare retrieve conditions                        |        | null $what<br>null $operators                      | array          |
| retrieve      | Retrieve element                                   |        | null $what<br>bool $encode<br>null $onlyFields<br>null $orderBy<br>bool $returnAsArray<br>null $operators<br>bool $dump | array<br>mixed |
| fetch         |                                                    |        | $what<br>null $operators                           | array          |

Markdown Result

CoreClass

| Method | Description | Type | Parameters | Return | | ------------- | -------------------------------------------------- | ------ | -------------------------------------------------- | -------------- | | __construct | Constructor | public | | | | __init | Initialize | | | bool | | CoreClass | Constructor | | | | | getInstance | Get singleton instance | | | CoreClass | | apply_filters | Apply module hook filters | | $name<br>$data | mixed | | do_action | Do module hook actions | | $name | bool | | add_action | Add module hook action | | $name<br>$action | bool | | add_filter | Add module hook filter | | $name<br>$filter | bool | | add_request | Add Ajax request | | $name<br>$request<br>bool $public | bool | | exists | Check if element already exists if exists it will be updated on Save else it will be inserted | | null $what<br>bool $undelete | bool | | prepare | Prepare retrieve conditions | | null $what<br>null $operators | array | | retrieve | Retrieve element | | null $what<br>bool $encode<br>null $onlyFields<br>null $orderBy<br>bool $returnAsArray<br>null $operators<br>bool $dump | array<br>mixed | | fetch | | | $what<br>null $operators | array |

  Files folder image Files  
File Role Description
Files folder imageTest (2 files)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Plain text file Markdown.php Class Class source
Plain text file Parser.php Class Class source
Accessible without login Plain text file README.md Doc. Documentation
Plain text file TextTable.php Class Class source

  Files folder image Files  /  Test  
File Role Description
  Plain text file Sample.php Class Class source
  Accessible without login Plain text file test.php Aux. Auxiliary script

 Version Control Unique User Downloads Download Rankings  
 100%
Total:105
This week:0
All time:9,171
This week:344Up