SelfResolvingDefinitionInterface.php 630 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * This file is part of Hyperf.
  5. *
  6. * @link https://www.hyperf.io
  7. * @document https://hyperf.wiki
  8. * @contact group@hyperf.io
  9. * @license https://github.com/hyperf/hyperf/blob/master/LICENSE
  10. */
  11. namespace Hyperf\Di\Definition;
  12. use Psr\Container\ContainerInterface;
  13. interface SelfResolvingDefinitionInterface
  14. {
  15. /**
  16. * Resolve the definition and return the resulting value.
  17. */
  18. public function resolve(ContainerInterface $container);
  19. /**
  20. * Check if a definition can be resolved.
  21. */
  22. public function isResolvable(ContainerInterface $container): bool;
  23. }