Class luya\admin\openapi\phpdoc\PhpDocParam

Inheritanceluya\admin\openapi\phpdoc\PhpDocParam
Available since version3.2.0

Php Doc Param Object.

The param notation is the same as for the @property annotation therefore PhpDocParm serves both param and property.

Property Details

Hide inherited properties

$definition protected property
protected $definition null
$phpDocParser protected property
protected $phpDocParser null

Method Details

Hide inherited methods

__construct() public method

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;
}

            
getDescription() public method

Description.

public string getDescription ( )

                public function getDescription()
{
    return $this->definition[3] ?? '';
}

            
getName() public method

Get name ($name) of the variable.

public string getName ( )

                public function getName()
{
    return isset($this->definition[2]) ? trim($this->definition[2]) : '';
}

            
getNormalizedName() public method

Get attribute name without dollaer.

public void getNormalizedName ( )

                public function getNormalizedName()
{
    return ltrim($this->getName(), '$');
}

            
getType() public method

PhpDocType

public luya\admin\openapi\phpdoc\PhpDocType getType ( )

                public function getType()
{
    return new PhpDocType($this->phpDocParser, $this->definition[1] ?? null);
}