Class yii\apidoc\models\ParamDoc
| Inheritance | yii\apidoc\models\ParamDoc » yii\base\BaseObject |
|---|---|
| Available since extension's version | 2.0 |
| Source Code | https://github.com/yiisoft/yii2-apidoc/blob/master/models/ParamDoc.php |
Public Properties
| Property | Type | Description | Defined By |
|---|---|---|---|
| $defaultValue | string|null | yii\apidoc\models\ParamDoc | |
| $description | string|null | yii\apidoc\models\ParamDoc | |
| $isOptional | boolean|null | yii\apidoc\models\ParamDoc | |
| $isPassedByReference | boolean|null | yii\apidoc\models\ParamDoc | |
| $name | string | yii\apidoc\models\ParamDoc | |
| $parent | yii\apidoc\models\ParamDoc | ||
| $sourceFile | string|null | yii\apidoc\models\ParamDoc | |
| $type | \phpDocumentor\Reflection\Type|null | yii\apidoc\models\ParamDoc |
Public Methods
| Method | Description | Defined By |
|---|---|---|
| __construct() | yii\apidoc\models\ParamDoc |
Property Details
Method Details
| public mixed __construct ( yii\apidoc\models\FunctionDoc|yii\apidoc\models\MethodDoc $parent, \phpDocumentor\Reflection\Php\Argument|null $reflector = null, yii\apidoc\models\Context|null $context = null, array $config = [] ) | ||
| $parent | yii\apidoc\models\FunctionDoc|yii\apidoc\models\MethodDoc | |
| $reflector | \phpDocumentor\Reflection\Php\Argument|null | |
| $context | yii\apidoc\models\Context|null | |
| $config | array | |
public function __construct(public $parent, $reflector = null, $context = null, $config = [])
{
parent::__construct($config);
if ($reflector !== null) {
$this->name = $reflector->getName();
if ($this->type === null) {
$this->type = $reflector->getType();
}
$reflectorDefault = $reflector->getDefault();
$this->defaultValue = $reflectorDefault !== null ? (string) $reflectorDefault : null;
$this->isOptional = $this->defaultValue !== null;
$this->isPassedByReference = $reflector->isByReference();
}
$this->name = '$' . $this->name;
}