1: <?php
2:
3: /**
4: * This file is part of the Nette Framework (https://nette.org)
5: * Copyright (c) 2004 David Grudl (http://davidgrudl.com)
6: */
7:
8: namespace Nette\ComponentModel;
9:
10: use Nette;
11:
12:
13: /**
14: * Containers are objects that logically contain zero or more IComponent components.
15: *
16: * @author David Grudl
17: */
18: interface IContainer extends IComponent
19: {
20:
21: /**
22: * Adds the specified component to the IContainer.
23: * @param IComponent
24: * @param string
25: * @return void
26: */
27: function addComponent(IComponent $component, $name);
28:
29: /**
30: * Removes a component from the IContainer.
31: * @param IComponent
32: * @return void
33: */
34: function removeComponent(IComponent $component);
35:
36: /**
37: * Returns single component.
38: * @param string
39: * @return IComponent|NULL
40: */
41: function getComponent($name);
42:
43: /**
44: * Iterates over a components.
45: * @param bool recursive?
46: * @param string class types filter
47: * @return \Iterator
48: */
49: function getComponents($deep = FALSE, $filterType = NULL);
50:
51: }
52: