PHP code example of gealex / phpdoc-to-rst
1. Go to this page and download the library: Download gealex/phpdoc-to-rst library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
gealex / phpdoc-to-rst example snippets
// your source path or multiple path to be parsed
$src = [__DIR__.'/../src'];
// destination path for the documentation
$dst = __DIR__.'/../docs/api';
$apiDocBuilder = new ApiDocBuilder($src, $dst);
// DEBUG FATURES : optional
// optional : activate verbosity
$apiDocBuilder->setVerboseOutput(true);
// optional : activate debug
$apiDocBuilder->setDebugOutput(true);
// EXTENSIONS : optional
/**
* Do not render classes marked with phpDoc internal tag
* Do only render public methods/properties.
*/
$apiDocBuilder->addExtension(PublicOnlyExtension::class);
/**
* Do not render classes marked with phpDoc internal tag
* Do only render public methods/properties.
*/
$apiDocBuilder->addExtension(NoPrivateExtension::class);
/**
* This extension will render a list of methods for easy access
* at the beginning of classes, interfaces and traits.
*/
$apiDocBuilder->addExtension(TocExtension::class);
/**
* This extension adds a link to the source at github to all elements.
*
* Arguments
* 0 => Url to the github repo (