index.php 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. /*
  3. * This file is part of the Cygnite package.
  4. *
  5. * (c) Sanjoy Dey <[email protected]>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. /*
  11. * This index file is entry point of the framework,
  12. * We will define the paths here to start bootstraping
  13. *
  14. * @author Sanjoy Dey <[email protected]>
  15. */
  16. /*
  17. | ---------------------------------------------------------------
  18. | Define Directory Separator
  19. * ---------------------------------------------------------------
  20. */
  21. define('DS', DIRECTORY_SEPARATOR);
  22. /**
  23. |---------------------------------------------------------------
  24. | Define PHP file extension
  25. | ---------------------------------------------------------------
  26. */
  27. defined('EXT') or define('EXT', '.php');
  28. /*---------------------------------------------------------------
  29. | Now that we know the path, set the main path constants
  30. | path to the packages folder.
  31. | ---------------------------------------------------------------
  32. */
  33. defined('CF_SYSTEM') or define('CF_SYSTEM', 'cygnite-package');
  34. defined('CF_BOOTSTRAP') or define('CF_BOOTSTRAP', 'boot');
  35. /* --------------------------------------------------------------
  36. | Define application folder name
  37. | ---------------------------------------------------------------
  38. */
  39. defined('APPPATH') or define('APPPATH', 'apps');
  40. //chdir(dirname(__DIR__));
  41. /* --------------------------------------------------------------
  42. | Define `root` directory name
  43. | ---------------------------------------------------------------
  44. */
  45. $dir = explode(DS, dirname(__FILE__));
  46. defined('ROOTDIR') or define('ROOTDIR', rtrim(end($dir)));
  47. defined('CYGNITE_BASE') or define('CYGNITE_BASE', dirname(__FILE__));
  48. /* ---------------------------------------------------------------
  49. | We have defined path, lets start booting by including start.php
  50. | ----------------------------------------------------------------
  51. */
  52. require_once CF_BOOTSTRAP.DS.'start'.EXT;