Final Class Yiisoft\Definitions\ValueDefinition
| Inheritance | Yiisoft\ |
|---|---|
| Implements | Yiisoft\ |
Value definition resolves value passed as is.
Public Methods
| Method | Description | Defined By |
|---|---|---|
| __construct() | Yiisoft\ |
|
| getType() | Get type of the value. | Yiisoft\ |
| resolve() | Yiisoft\ |
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;
}
User Contributed Notes
Leave a comment
Join the conversation to share a note.