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