1: <?php
2:
3: /**
4: * This file is part of the Nette Framework (http://nette.org)
5: *
6: * Copyright (c) 2004 David Grudl (http://davidgrudl.com)
7: *
8: * For the full copyright and license information, please view
9: * the file license.txt that was distributed with this source code.
10: */
11:
12: namespace Nette\DI;
13:
14: use Nette;
15:
16:
17:
18: /**
19: * The dependency injection container.
20: *
21: * @author David Grudl
22: */
23: interface IContainer
24: {
25:
26: /**
27: * Adds the service to the container.
28: * @param string
29: * @param mixed object, class name or callback
30: * @return void
31: */
32: function addService($name, $service);
33:
34: /**
35: * Gets the service object.
36: * @param string
37: * @return mixed
38: */
39: function getService($name);
40:
41: /**
42: * Removes the service from the container.
43: * @param string
44: * @return void
45: */
46: function removeService($name);
47:
48: /**
49: * Does the service exist?
50: * @return bool
51: */
52: function hasService($name);
53:
54: }
55: