Final Class Yiisoft\Hydrator\Attribute\Parameter\Di
| Inheritance | Yiisoft\Hydrator\Attribute\Parameter\Di |
|---|---|
| Implements | Yiisoft\Hydrator\Attribute\Parameter\ParameterAttributeInterface |
Resolve value as instance obtained from container by the specified ID or auto-resolved ID by PHP type.
Public Methods
| Method | Description | Defined By |
|---|---|---|
| __construct() | Yiisoft\Hydrator\Attribute\Parameter\Di | |
| getId() | Get container ID to obtain instance from. | Yiisoft\Hydrator\Attribute\Parameter\Di |
| getResolver() | Yiisoft\Hydrator\Attribute\Parameter\Di |
Method Details
| public mixed __construct ( string|null $id = null ) | ||
| $id | string|null |
Container ID to obtain instance from. |
public function __construct(
private ?string $id = null
) {
}
Get container ID to obtain instance from.
| public string|null getId ( ) | ||
| return | string|null |
Container ID to obtain instance from. |
|---|---|---|
public function getId(): ?string
{
return $this->id;
}
Signup or Login in order to comment.