Final Class Yiisoft\Hydrator\Attribute\Parameter\Di
| Inheritance | Yiisoft\ |
|---|---|
| Implements | Yiisoft\ |
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\ |
|
| getId() | Get container ID to obtain instance from. | Yiisoft\ |
| getResolver() | Yiisoft\ |
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;
}
User Contributed Notes
Leave a comment
Join the conversation to share a note.