Class luya\admin\openapi\phpdoc\PhpDocParam
Inheritance | luya\admin\openapi\phpdoc\PhpDocParam |
---|---|
Available since version | 3.2.0 |
Source Code | https://github.com/luyadev/luya-module-admin/blob/master/src/openapi/phpdoc/PhpDocParam.php |
Php Doc Param Object.
The param notation is the same as for the @property annotation therefore PhpDocParm serves both param and property.
Protected Properties
Property | Type | Description | Defined By |
---|---|---|---|
$definition | luya\admin\openapi\phpdoc\PhpDocParam | ||
$phpDocParser | luya\admin\openapi\phpdoc\PhpDocParam |
Public Methods
Method | Description | Defined By |
---|---|---|
__construct() | luya\admin\openapi\phpdoc\PhpDocParam | |
getDescription() | Description. | luya\admin\openapi\phpdoc\PhpDocParam |
getName() | Get name ($name) of the variable. | luya\admin\openapi\phpdoc\PhpDocParam |
getNormalizedName() | Get attribute name without dollaer. | luya\admin\openapi\phpdoc\PhpDocParam |
getType() | PhpDocType | luya\admin\openapi\phpdoc\PhpDocParam |
Property Details
Method Details
public void __construct ( luya\admin\openapi\phpdoc\PhpDocParser $phpDocParser, array $definition ) | ||
$phpDocParser | ||
$definition |
public function __construct(PhpDocParser $phpDocParser, array $definition)
{
$this->phpDocParser = $phpDocParser;
$this->definition = $definition;
}
Description.
public string getDescription ( ) |
public function getDescription()
{
return $this->definition[3] ?? '';
}
Get name ($name) of the variable.
public string getName ( ) |
public function getName()
{
return isset($this->definition[2]) ? trim($this->definition[2]) : '';
}
Get attribute name without dollaer.
public void getNormalizedName ( ) |
public function getNormalizedName()
{
return ltrim($this->getName(), '$');
}
PhpDocType
public luya\admin\openapi\phpdoc\PhpDocType getType ( ) |
public function getType()
{
return new PhpDocType($this->phpDocParser, $this->definition[1] ?? null);
}