Interface Yiisoft\Definitions\Contract\DefinitionInterface
Definition is describing a way to create and configure a service or an object.
Public Methods
| Method | Description | Defined By |
|---|---|---|
| resolve() | Resolve this definition. | Yiisoft\ |
Method Details
Resolve this definition.
| public abstract mixed|null resolve ( \ | ||
| $container | \ |
|
| return | mixed|null |
Ready to use object or null if definition can not be resolved and is marked as optional. |
|---|---|---|
| throws | Yiisoft\ |
If an object of incorrect type was created. |
| throws | Yiisoft\ |
If there is a circular reference detected when resolving the definition. |
| throws | \ |
If container does not know how to resolve the definition. |
| throws | Yiisoft\ |
If an object can not be instantiated. |
public function resolve(ContainerInterface $container): mixed;
User Contributed Notes
Leave a comment
Join the conversation to share a note.