App.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <?php
  2. /*
  3. *---------------------------------------------------------------
  4. * Application Object
  5. *---------------------------------------------------------------
  6. *
  7. * This is your default application object.
  8. */
  9. class App extends CCApp
  10. {
  11. /**
  12. * The application name
  13. *
  14. * @var string
  15. */
  16. public static $name = 'My Application';
  17. /**
  18. * App configuration
  19. *
  20. * @var CCConfig
  21. */
  22. public static $config = null;
  23. /**
  24. * current user object
  25. *
  26. * @var User
  27. */
  28. public static $user = null;
  29. /**
  30. * Application initialization.
  31. * do your inital stuff here like getting the current user object ect..
  32. * You can return a CCResponse wich will cancle all other actions
  33. * if enebaled ( see. main.config -> send_app_wake_response )
  34. *
  35. * @return void | CCResponse
  36. */
  37. public static function wake()
  38. {
  39. /*
  40. * Start the session by adding the current uri
  41. */
  42. //CCSession::set( 'uri', CCServer::uri() );
  43. /*
  44. * try to authenticate the user
  45. */
  46. //static::$user =& CCAuth::handler()->user;
  47. /*
  48. * load the App configuration
  49. */
  50. //static::$config = CCConfig::create( 'app' );
  51. }
  52. /**
  53. * Environment wake
  54. * This is an environment wake they get called if your running
  55. * the application in a special environment like:
  56. * wake_production
  57. * wake_phpunit
  58. * wake_test
  59. *
  60. * @return void | CCResponse
  61. */
  62. public static function wake_development()
  63. {
  64. CCProfiler::check( 'App::development - Application finished wake events.' );
  65. }
  66. }