PHP Class PHPDocMD\Generator

Author: Evert Pot (https://evertpot.coom/)
Exibir arquivo Open project: evert/phpdoc-md Class Usage Examples

Protected Properties

Property Type Description
$apiIndexFile string Filename for API Index.
$classDefinitions array The list of classes and interfaces.
$linkTemplate string A simple template for generating links.
$outputDir string Output directory.
$templateDir string Directory containing the twig templates.

Public Methods

Method Description
__construct ( array $classDefinitions, string $outputDir, string $templateDir, string $linkTemplate = '%c.md', string $apiIndexFile = 'ApiIndex.md' )
classLink ( string $className, null | string $label = null ) : string This is a twig template function.
run ( ) Starts the generator.

Protected Methods

Method Description
createIndex ( ) : array Creates an index of classes and namespaces.

Method Details

__construct() public method

public __construct ( array $classDefinitions, string $outputDir, string $templateDir, string $linkTemplate = '%c.md', string $apiIndexFile = 'ApiIndex.md' )
$classDefinitions array
$outputDir string
$templateDir string
$linkTemplate string
$apiIndexFile string

createIndex() protected method

I'm generating the actual markdown output here, which isn't great...But it will have to do. If I don't want to make things too complicated.
protected createIndex ( ) : array
return array

run() public method

Starts the generator.
public run ( )

Property Details

$apiIndexFile protected_oe property

Filename for API Index.
protected string $apiIndexFile
return string

$classDefinitions protected_oe property

The list of classes and interfaces.
protected array $classDefinitions
return array

$linkTemplate protected_oe property

A simple template for generating links.
protected string $linkTemplate
return string

$outputDir protected_oe property

Output directory.
protected string $outputDir
return string

$templateDir protected_oe property

Directory containing the twig templates.
protected string $templateDir
return string