5 * @link http://mnapoli.github.com/PHP-DI/
6 * @copyright Matthieu Napoli (http://mnapoli.fr/)
7 * @license http://www.opensource.org/licenses/mit-license.php MIT (see the LICENSE file)
10 namespace DI\Definition\Resolver;
12 use DI\Definition\Definition;
13 use DI\Definition\Exception\DefinitionException;
16 * Resolves a definition to a value.
19 * @author Matthieu Napoli <matthieu@mnapoli.fr>
21 interface DefinitionResolver
24 * Resolve a definition to a value.
26 * @param Definition $definition Object that defines how the value should be obtained.
27 * @param array $parameters Optional parameters to use to build the entry.
29 * @throws DefinitionException If the definition cannot be resolved.
31 * @return mixed Value obtained from the definition.
33 public function resolve(Definition $definition, array $parameters = []);
36 * Check if a definition can be resolved.
38 * @param Definition $definition Object that defines how the value should be obtained.
39 * @param array $parameters Optional parameters to use to build the entry.
43 public function isResolvable(Definition $definition, array $parameters = []);