1: <?php
2: /**
3: * This file is part of the Autarky package.
4: *
5: * (c) Andreas Lutro <anlutro@gmail.com>
6: *
7: * For the full copyright and license information, please view the LICENSE
8: * file that was distributed with this source code.
9: */
10:
11: namespace Autarky\Container;
12:
13: /**
14: * Class resolver interface.
15: *
16: * Type-hint against this class if you only require to resolve classes from the
17: * container, not define factories, add callbacks or any of the other
18: * functionality. The ContainerInterface extends this interface, so if you type-
19: * hint against this interface, you will still get the container in most cases.
20: */
21: interface ClassResolverInterface
22: {
23: /**
24: * Resolve a class from the container. Dependencies of the resolved
25: * object will be resolved recursively.
26: *
27: * @param string $class
28: *
29: * @return mixed
30: */
31: public function resolve($class);
32: }
33: