Source for file IComponent.php

Documentation is available at IComponent.php

  1. 1: <?php
  2. 2:  
  3. 3: /**
  4. 4:  * Nette Framework
  5. 5:  *
  6. 6:  * Copyright (c) 2004, 2009 David Grudl (http://davidgrudl.com)
  7. 7:  *
  8. 8:  * This source file is subject to the "Nette license" that is bundled
  9. 9:  * with this package in the file license.txt.
  10. 10:  *
  11. 11:  * For more information please see https://nette.org
  12. 12:  *
  13. 13:  * @copyright  Copyright (c) 2004, 2009 David Grudl
  14. 14:  * @license    https://nette.org/license  Nette license
  15. 15:  * @link       https://nette.org
  16. 16:  * @category   Nette
  17. 17:  * @package    Nette
  18. 18:  * @version    $Id$
  19. 19:  */
  20. 20:  
  21. 21:  
  22. 22:  
  23. 23: /**
  24. 24:  * Provides functionality required by all components.
  25. 25:  *
  26. 26:  * @author     David Grudl
  27. 27:  * @copyright  Copyright (c) 2004, 2009 David Grudl
  28. 28:  * @package    Nette
  29. 29:  */
  30. 30: interface IComponent
  31. 31: {
  32. 32:     /** Separator for component names in path concatenation. */
  33. 33:     const NAME_SEPARATOR '-';
  34. 34:  
  35. 35:     /**
  36. 36:      * @return string 
  37. 37:      */
  38. 38:     function getName();
  39. 39:  
  40. 40:     /**
  41. 41:      * Returns the container if any.
  42. 42:      * @return IComponentContainer|NULL
  43. 43:      */
  44. 44:     function getParent();
  45. 45:  
  46. 46:     /**
  47. 47:      * Sets the parent of this component.
  48. 48:      * @param  IComponentContainer 
  49. 49:      * @param  string 
  50. 50:      * @return void 
  51. 51:      */
  52. 52:     function setParent(IComponentContainer $parent NULL$name NULL);
  53. 53:  
  54. 54:     /**
  55. 55:      * Sets the service location (EXPERIMENTAL).
  56. 56:      * @param  IServiceLocator 
  57. 57:      * @return void 
  58. 58:      */
  59. 59:     function setServiceLocator(IServiceLocator $locator);
  60. 60:  
  61. 61:     /**
  62. 62:      * Gets the service locator (EXPERIMENTAL).
  63. 63:      * @return IServiceLocator 
  64. 64:      */
  65. 65:     function getServiceLocator();
  66. 66:  
  67. 67: }