| 1 |
<?php |
| 2 |
|
| 3 |
declare(strict_types=1); |
| 4 |
|
| 5 |
namespace WPDeveloper\BetterDocs\Dependencies\DI\Definition; |
| 6 |
|
| 7 |
use WPDeveloper\BetterDocs\Dependencies\Psr\Container\ContainerInterface; |
| 8 |
|
| 9 |
/** |
| 10 |
* Describes a definition that can resolve itself. |
| 11 |
* |
| 12 |
* @author Matthieu Napoli <matthieu@mnapoli.fr> |
| 13 |
*/ |
| 14 |
interface SelfResolvingDefinition |
| 15 |
{ |
| 16 |
/** |
| 17 |
* Resolve the definition and return the resulting value. |
| 18 |
* |
| 19 |
* @return mixed |
| 20 |
*/ |
| 21 |
public function resolve(ContainerInterface $container); |
| 22 |
|
| 23 |
/** |
| 24 |
* Check if a definition can be resolved. |
| 25 |
*/ |
| 26 |
public function isResolvable(ContainerInterface $container) : bool; |
| 27 |
} |
| 28 |
|