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\Source;
6
 
7
use DI\Definition\Definition;
8
use DI\Definition\Exception\InvalidDefinition;
9
 
10
/**
11
 * Source of definitions for entries of the container.
12
 *
13
 * @author Matthieu Napoli <matthieu@mnapoli.fr>
14
 */
15
interface DefinitionSource
16
{
17
    /**
18
     * Returns the DI definition for the entry name.
19
     *
20
     * @throws InvalidDefinition An invalid definition was found.
21
     */
22
    public function getDefinition(string $name) : Definition|null;
23
 
24
    /**
25
     * @return array<string,Definition> Definitions indexed by their name.
26
     */
27
    public function getDefinitions() : array;
28
}