framework.php 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <?php
  2. /**
  3. *---------------------------------------------------------------
  4. * Framework initialisation
  5. *---------------------------------------------------------------
  6. *
  7. * This is the framework initialisation. Thats the point where
  8. * all important parts come together and build something
  9. * aweomse together.
  10. *
  11. * @package ClanCatsFramework
  12. * @author Mario Döring <[email protected]>
  13. * @version 2.0
  14. * @copyright 2010 - 2014 ClanCats GmbH
  15. *
  16. * ###
  17. *
  18. *---------------------------------------------------------------
  19. * Application root
  20. *---------------------------------------------------------------
  21. *
  22. * The application root or CCROOT defines the absoulte path to
  23. * the framework.
  24. */
  25. define( 'CCROOT', __DIR__.'/' );
  26. /*
  27. *---------------------------------------------------------------
  28. * file extension
  29. *---------------------------------------------------------------
  30. *
  31. * This defines the global used file extention of the php files.
  32. */
  33. define( 'EXT', '.php' );
  34. /*
  35. *---------------------------------------------------------------
  36. * get the boot paths
  37. *---------------------------------------------------------------
  38. *
  39. * You can modify that file, its yours. Its especially useful
  40. * if you have multiple installations on one server and want
  41. * to use just one core or one orbit for them all.
  42. */
  43. $paths = require CCROOT.'boot/paths'.EXT;
  44. /*
  45. *---------------------------------------------------------------
  46. * the direcotries
  47. *---------------------------------------------------------------
  48. *
  49. * Here are the module directories defined.
  50. * @ToDo: move them to the classes that use that direcotries.
  51. * that way the you could subclass a class and define
  52. * a custom direcotry.
  53. */
  54. $directories = array(
  55. 'controller' => 'controllers/',
  56. 'language' => 'language/',
  57. 'class' => 'classes/',
  58. 'console' => 'console/',
  59. 'config' => 'config/',
  60. 'view' => 'views/',
  61. 'test' => 'tests/',
  62. );
  63. /*
  64. *---------------------------------------------------------------
  65. * wake CCF
  66. *---------------------------------------------------------------
  67. *
  68. * Lets require the ClanCatsFramework resources
  69. */
  70. require $paths['core'].'wake'.EXT;
  71. /*
  72. *---------------------------------------------------------------
  73. * wake the application
  74. *---------------------------------------------------------------
  75. *
  76. * Lets wake the main application.
  77. */
  78. ClanCats::wake_app( 'App' );
  79. // at this point the app has completet its own boot
  80. CCProfiler::check( "CCF - App completed." );