Final Class Yiisoft\Definitions\ValueDefinition
| Inheritance | Yiisoft\Definitions\ValueDefinition |
|---|---|
| Implements | Yiisoft\Definitions\Contract\DefinitionInterface |
Value definition resolves value passed as is.
Public Methods
| Method | Description | Defined By |
|---|---|---|
| __construct() | Yiisoft\Definitions\ValueDefinition | |
| getType() | Get type of the value. | Yiisoft\Definitions\ValueDefinition |
| resolve() | Yiisoft\Definitions\ValueDefinition |
Method Details
| public mixed __construct ( mixed $value, string|null $type = null ) | ||
| $value | mixed |
Value to be returned on resolving. |
| $type | string|null |
Value type. |
public function __construct(
private readonly mixed $value,
private readonly ?string $type = null,
) {}
Get type of the value.
| public string|null getType ( ) | ||
| return | string|null |
Value type. |
|---|---|---|
public function getType(): ?string
{
return $this->type;
}
Signup or Login in order to comment.