Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
<?php
2
 
3
declare(strict_types=1);
4
 
5
namespace DI\Definition;
6
 
7
use 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
    public function resolve(ContainerInterface $container) : mixed;
20
 
21
    /**
22
     * Check if a definition can be resolved.
23
     */
24
    public function isResolvable(ContainerInterface $container) : bool;
25
}