Bootstrapper.php 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <?php
  2. /**
  3. * Zend Framework
  4. *
  5. * LICENSE
  6. *
  7. * This source file is subject to the new BSD license that is bundled
  8. * with this package in the file LICENSE.txt.
  9. * It is also available through the world-wide-web at this URL:
  10. * http://framework.zend.com/license/new-bsd
  11. * If you did not receive a copy of the license and are unable to
  12. * obtain it through the world-wide-web, please send an email
  13. * to license@zend.com so we can send you a copy immediately.
  14. *
  15. * @category Zend
  16. * @package Zend_Application
  17. * @subpackage Bootstrap
  18. * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
  19. * @license http://framework.zend.com/license/new-bsd New BSD License
  20. * @version $Id$
  21. */
  22. /**
  23. * Interface for bootstrap classes
  24. *
  25. * @category Zend
  26. * @package Zend_Application
  27. * @subpackage Bootstrap
  28. * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
  29. * @license http://framework.zend.com/license/new-bsd New BSD License
  30. */
  31. interface Zend_Application_Bootstrap_Bootstrapper
  32. {
  33. /**
  34. * Constructor
  35. *
  36. * @param Zend_Application $application
  37. */
  38. public function __construct($application);
  39. /**
  40. * Set bootstrap options
  41. *
  42. * @param array $options
  43. * @return Zend_Application_Bootstrap_Bootstrapper
  44. */
  45. public function setOptions(array $options);
  46. /**
  47. * Retrieve application object
  48. *
  49. * @return Zend_Application|Zend_Application_Bootstrap_Bootstrapper
  50. */
  51. public function getApplication();
  52. /**
  53. * Retrieve application environment
  54. *
  55. * @return string
  56. */
  57. public function getEnvironment();
  58. /**
  59. * Retrieve list of class resource initializers (_init* methods). Returns
  60. * as resource/method pairs.
  61. *
  62. * @return array
  63. */
  64. public function getClassResources();
  65. /**
  66. * Retrieve list of class resource initializer names (resource names only,
  67. * no method names)
  68. *
  69. * @return array
  70. */
  71. public function getClassResourceNames();
  72. /**
  73. * Bootstrap application or individual resource
  74. *
  75. * @param null|string $resource
  76. * @return mixed
  77. */
  78. public function bootstrap($resource = null);
  79. /**
  80. * Run the application
  81. *
  82. * @return void
  83. */
  84. public function run();
  85. }