Class yii\apidoc\helpers\PrettyPrinter
Inheritance | yii\apidoc\helpers\PrettyPrinter » phpDocumentor\Reflection\PrettyPrinter |
---|---|
Available since extension's version | 2.0 |
Source Code | https://github.com/yiisoft/yii2-apidoc/blob/master/helpers/PrettyPrinter.php |
Enhances the phpDocumentor PrettyPrinter with short array syntax
Public Methods
Method | Description | Defined By |
---|---|---|
getRepresentationOfValue() | Returns a simple human readable output for a value. | yii\apidoc\helpers\PrettyPrinter |
pExpr_Array() | yii\apidoc\helpers\PrettyPrinter |
Method Details
Returns a simple human readable output for a value.
public static string getRepresentationOfValue ( \PHPParser_Node_Expr $value ) | ||
$value | \PHPParser_Node_Expr |
The value node as provided by PHP-Parser. |
public static function getRepresentationOfValue(PHPParser_Node_Expr $value)
{
if ($value === null) {
return '';
}
$printer = new static();
return $printer->prettyPrintExpr($value);
}
public string pExpr_Array ( \PHPParser_Node_Expr_Array $node ) | ||
$node | \PHPParser_Node_Expr_Array |
public function pExpr_Array(PHPParser_Node_Expr_Array $node)
{
return '[' . $this->pCommaSeparated($node->items) . ']';
}