PhpDocGenerator
class PhpDocGenerator (View source)
Helper class to generate PHPDoc.
Properties
protected bool | $insideNamespace | Are we generating PHPDoc to be placed inside a namespace? |
|
protected string | $indentation | Indentation. | |
protected string | $singleDocBlock | Insert the variable definitions in the same PHPDoc block? |
Methods
Are we generating PHPDoc to be placed inside a namespace?
Are we generating PHPDoc to be placed inside a namespace?
Get the indentation.
Set the indentation.
Insert the variable definitions in the same PHPDoc block?
Insert the variable definitions in the same PHPDoc block?
Generate the PHPDoc to describe a variable.
Generate the PHPDoc to describe a list of variables.
Generate the PHPDoc content to describe a variable (without opening/closing comments).
Get the PHPDoc type name of a variable.
Get all the names representing an object instance (class name, parent class names, interface names).
Details
bool
isInsideNamespace()
Are we generating PHPDoc to be placed inside a namespace?
$this
setIsInsideNamespace(bool $value)
Are we generating PHPDoc to be placed inside a namespace?
string
getIndentation()
Get the indentation.
$this
setIndentation(string $value)
Set the indentation.
bool
isSingleDocBlock()
Insert the variable definitions in the same PHPDoc block?
$this
setIsSingleDocBlock(bool $value)
Insert the variable definitions in the same PHPDoc block?
string
describeVar(string $name, mixed $value)
Generate the PHPDoc to describe a variable.
string
describeVars(array $vars, bool $sortByName = true)
Generate the PHPDoc to describe a list of variables.
protected string
describeVarUncommented(string $name, mixed $value)
Generate the PHPDoc content to describe a variable (without opening/closing comments).
protected string
getVarType(mixed $var, int $arrayLevel = 0)
Get the PHPDoc type name of a variable.
protected array
getObjectDescriptors(mixed $var)
Get all the names representing an object instance (class name, parent class names, interface names).