## Table of contents - [\PHPDocsMD\ClassEntity](#class-phpdocsmdclassentity) - [\PHPDocsMD\ClassEntityFactory](#class-phpdocsmdclassentityfactory) - [\PHPDocsMD\CodeEntity](#class-phpdocsmdcodeentity) - [\PHPDocsMD\DocInfo](#class-phpdocsmddocinfo) - [\PHPDocsMD\DocInfoExtractor](#class-phpdocsmddocinfoextractor) - [\PHPDocsMD\FunctionEntity](#class-phpdocsmdfunctionentity) - [\PHPDocsMD\FunctionFinder](#class-phpdocsmdfunctionfinder) - [\PHPDocsMD\MDTableGenerator](#class-phpdocsmdmdtablegenerator) - [\PHPDocsMD\ParamEntity](#class-phpdocsmdparamentity) - [\PHPDocsMD\Reflector](#class-phpdocsmdreflector) - [\PHPDocsMD\ReflectorInterface (interface)](#interface-phpdocsmdreflectorinterface) - [\PHPDocsMD\UseInspector](#class-phpdocsmduseinspector) - [\PHPDocsMD\Utils](#class-phpdocsmdutils) - [\PHPDocsMD\Console\CLI](#class-phpdocsmdconsolecli) - [\PHPDocsMD\Console\PHPDocsMDCommand](#class-phpdocsmdconsolephpdocsmdcommand)
### Class: \PHPDocsMD\ClassEntity > Object describing a class or an interface | Visibility | Function | |:-----------|:---------| | public | generateAnchor() : string
Generates an anchor link out of the generated title (see generateTitle) | | public | generateTitle(string $format=`'%label%: %name% %extra%'`) : string
Generate a title describing the class this object is referring to | | public | getExtends() : string | | public | getFunctions() : [\PHPDocsMD\FunctionEntity](#class-phpdocsmdfunctionentity)[] | | public | getInterfaces() : array | | public | hasIgnoreTag(bool $toggle=null) : bool | | public | isAbstract(bool $toggle=null) : bool | | public | isInterface(bool $toggle=null) : bool | | public | isNative(bool $toggle=null) : bool | | public | isSame(string/object $class) : bool
Check whether this object is referring to given class name or object instance | | public | setExtends(string $extends) : void | | public | setFunctions([\PHPDocsMD\FunctionEntity](#class-phpdocsmdfunctionentity)[] $functions) : void | | public | setInterfaces(array $implements) : void | | public | setName(string $name) : void | *This class extends [\PHPDocsMD\CodeEntity](#class-phpdocsmdcodeentity)*
### Class: \PHPDocsMD\ClassEntityFactory > Class capable of creating ClassEntity objects | Visibility | Function | |:-----------|:---------| | public | __construct([\PHPDocsMD\DocInfoExtractor](#class-phpdocsmddocinfoextractor) $docInfoExtractor) : void | | public | create([\ReflectionClass](http://php.net/manual/en/class.reflectionclass.php) $reflection) : mixed |
### Class: \PHPDocsMD\CodeEntity > Object describing a piece of code | Visibility | Function | |:-----------|:---------| | public | getDeprecationMessage() : string | | public | getDescription() : string | | public | getExample() : string | | public | getName() : string | | public | isDeprecated(bool $toggle=null) : void/bool | | public | setDeprecationMessage(string $deprecationMessage) : void | | public | setDescription(string $description) : void | | public | setExample(string $example) : void | | public | setName(string $name) : void |
### Class: \PHPDocsMD\DocInfo > Class containing information about a function/class that's being made available via a comment block | Visibility | Function | |:-----------|:---------| | public | __construct(array $data) : void | | public | getDeprecationMessage() : string | | public | getDescription() : string | | public | getExample() : string | | public | getParameterInfo(string $name) : array | | public | getParameters() : array | | public | getReturnType() : string | | public | shouldBeIgnored() : bool | | public | shouldInheritDoc() : bool |
### Class: \PHPDocsMD\DocInfoExtractor > Class that can extract information from a function/class comment | Visibility | Function | |:-----------|:---------| | public | applyInfoToEntity([\ReflectionClass](http://php.net/manual/en/class.reflectionclass.php)/[\ReflectionMethod](http://php.net/manual/en/class.reflectionmethod.php) $reflection, [\PHPDocsMD\DocInfo](#class-phpdocsmddocinfo) $docInfo, [\PHPDocsMD\CodeEntity](#class-phpdocsmdcodeentity) $code) : void | | public | extractInfo([\ReflectionClass](http://php.net/manual/en/class.reflectionclass.php)/[\ReflectionMethod](http://php.net/manual/en/class.reflectionmethod.php) $reflection) : [\PHPDocsMD\DocInfo](#class-phpdocsmddocinfo) |
### Class: \PHPDocsMD\FunctionEntity > Object describing a function | Visibility | Function | |:-----------|:---------| | public | getClass() : string | | public | getParams() : [\PHPDocsMD\ParamEntity](#class-phpdocsmdparamentity)[] | | public | getReturnType() : string | | public | getVisibility() : string | | public | hasParams() : bool | | public | isAbstract(bool $toggle=null) : bool | | public | isReturningNativeClass(bool $toggle=null) : bool | | public | isStatic(bool $toggle=null) : bool | | public | setClass(string $class) : void | | public | setParams([\PHPDocsMD\ParamEntity](#class-phpdocsmdparamentity)[] $params) : void | | public | setReturnType(string $returnType) : void | | public | setVisibility(string $visibility) : void | *This class extends [\PHPDocsMD\CodeEntity](#class-phpdocsmdcodeentity)*
### Class: \PHPDocsMD\FunctionFinder > Find a specific function in a class or an array of classes | Visibility | Function | |:-----------|:---------| | public | find(string $methodName, string $className) : bool/[\PHPDocsMD\FunctionEntity](#class-phpdocsmdfunctionentity) | | public | findInClasses(string $methodName, array $classes) : bool/[\PHPDocsMD\FunctionEntity](#class-phpdocsmdfunctionentity) |
### Class: \PHPDocsMD\MDTableGenerator > Class that can create a markdown-formatted table describing class functions referred to via FunctionEntity objects ###### Example ```php openTable(); foreach($classEntity->getFunctions() as $func) { $generator->addFunc( $func ); } echo $generator->getTable(); ``` | Visibility | Function | |:-----------|:---------| | public | addFunc([\PHPDocsMD\FunctionEntity](#class-phpdocsmdfunctionentity) $func) : string
Generates a markdown formatted table row with information about given function. Then adds the row to the table and returns the markdown formatted string. | | public | appendExamplesToEndOfTable(bool $toggle) : void
All example comments found while generating the table will be appended to the end of the table. Set $toggle to false to prevent this behaviour | | public | doDeclareAbstraction(bool $toggle) : void
Toggle whether or not methods being abstract (or part of an interface) should be declared as abstract in the table | | public static | formatExampleComment(string $example) : string
Create a markdown-formatted code view out of an example comment | | public | getTable() : string | | public | openTable() : void
Begin generating a new markdown-formatted table |
### Class: \PHPDocsMD\ParamEntity > Object describing a function parameter | Visibility | Function | |:-----------|:---------| | public | getDefault() : boolean | | public | getNativeClassType() : string/null | | public | getType() : string | | public | setDefault(boolean $default) : void | | public | setType(string $type) : void | *This class extends [\PHPDocsMD\CodeEntity](#class-phpdocsmdcodeentity)*
### Class: \PHPDocsMD\Reflector > Class that can compute ClassEntity objects out of real classes | Visibility | Function | |:-----------|:---------| | public | __construct(string $className, [\PHPDocsMD\FunctionFinder](#class-phpdocsmdfunctionfinder) $functionFinder=null, [\PHPDocsMD\DocInfoExtractor](#class-phpdocsmddocinfoextractor) $docInfoExtractor=null, [\PHPDocsMD\UseInspector](#class-phpdocsmduseinspector) $useInspector=null, [\PHPDocsMD\ClassEntityFactory](#class-phpdocsmdclassentityfactory) $classEntityFactory=null) : void | | public | getClassEntity() : [\PHPDocsMD\ClassEntity](#class-phpdocsmdclassentity) | | public static | getParamType([\ReflectionParameter](http://php.net/manual/en/class.reflectionparameter.php) $refParam) : string
Tries to find out if the type of the given parameter. Will return empty string if not possible. | | protected | createFunctionEntity([\ReflectionMethod](http://php.net/manual/en/class.reflectionmethod.php) $method, [\PHPDocsMD\ClassEntity](#class-phpdocsmdclassentity) $class, array $useStatements) : bool/[\PHPDocsMD\FunctionEntity](#class-phpdocsmdfunctionentity) | | protected | shouldIgnoreFunction([\PHPDocsMD\DocInfo](#class-phpdocsmddocinfo) $info, [\ReflectionMethod](http://php.net/manual/en/class.reflectionmethod.php) $method, [\PHPDocsMD\ClassEntity](#class-phpdocsmdclassentity) $class) : bool | ###### Examples of Reflector::getParamType() ```php getMethods() as $method ) { foreach($method->getParameters() as $param) { $name = $param->getName(); $type = Reflector::getParamType($param); printf("%s = %s\n", $name, $type); } } ``` *This class implements [\PHPDocsMD\ReflectorInterface](#interface-phpdocsmdreflectorinterface)*
### Interface: \PHPDocsMD\ReflectorInterface > Interface for classes that can compute ClassEntity objects | Visibility | Function | |:-----------|:---------| | public | getClassEntity() : [\PHPDocsMD\ClassEntity](#class-phpdocsmdclassentity) |
### Class: \PHPDocsMD\UseInspector > Class that can extract all use statements in a file | Visibility | Function | |:-----------|:---------| | public | getUseStatements([\ReflectionClass](http://php.net/manual/en/class.reflectionclass.php) $reflectionClass) : array | | public | getUseStatementsInFile(string $filePath) : array | | public | getUseStatementsInString(string $content) : string[] |
### Class: \PHPDocsMD\Utils | Visibility | Function | |:-----------|:---------| | public static | getClassBaseName(string $fullClassName) : string | | public static | isClassReference(string $typeDeclaration) : bool | | public static | isNativeClassReference(mixed $typeDeclaration) : bool | | public static | sanitizeClassName(string $name) : string | | public static | sanitizeDeclaration(string $typeDeclaration, string $currentNameSpace, string $delimiter=`'|'`) : string |
### Class: \PHPDocsMD\Console\CLI > Command line interface used to extract markdown-formatted documentation from classes | Visibility | Function | |:-----------|:---------| | public | __construct() : void | | public | run(\Symfony\Component\Console\Input\InputInterface $input=null, \Symfony\Component\Console\Output\OutputInterface $output=null) : int | *This class extends \Symfony\Component\Console\Application*
### Class: \PHPDocsMD\Console\PHPDocsMDCommand > Console command used to extract markdown-formatted documentation from classes | Visibility | Function | |:-----------|:---------| | public | extractClassNameFromLine(string $type, string $line) : string | | protected | configure() : void | | protected | execute(\Symfony\Component\Console\Input\InputInterface $input, \Symfony\Component\Console\Output\OutputInterface $output) : int/null | *This class extends \Symfony\Component\Console\Command\Command*