init.php 704 B

123456789101112131415161718192021222324252627
  1. <?php
  2. /**
  3. * Set KO7::$environment if a 'KOHANA_ENV' environment variable has been supplied.
  4. *
  5. * Note: If you supply an invalid environment name, a PHP warning will be thrown
  6. * saying "Couldn't find constant KO7::<INVALID_ENV_NAME>"
  7. */
  8. if (isset($_SERVER['KOHANA_ENV']))
  9. {
  10. KO7::$environment = constant('KO7::'.strtoupper($_SERVER['KOSEVEN_ENV']));
  11. }
  12. /**
  13. * Define the start time of the application, used for profiling.
  14. */
  15. if ( ! defined('KOHANA_START_TIME'))
  16. {
  17. define('KOHANA_START_TIME', KO7_START_TIME);
  18. }
  19. /**
  20. * Define the memory usage at the start of the application, used for profiling.
  21. */
  22. if ( ! defined('KOHANA_START_MEMORY'))
  23. {
  24. define('KOHANA_START_MEMORY', KO7_START_MEMORY);
  25. }