welcome.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. /**
  3. * Fuel is a fast, lightweight, community driven PHP5 framework.
  4. *
  5. * @package Fuel
  6. * @version 1.5
  7. * @author Fuel Development Team
  8. * @license MIT License
  9. * @copyright 2010 - 2013 Fuel Development Team
  10. * @link http://fuelphp.com
  11. */
  12. /**
  13. * The Welcome Controller.
  14. *
  15. * A basic controller example. Has examples of how to set the
  16. * response body and status.
  17. *
  18. * @package app
  19. * @extends Controller
  20. */
  21. class Controller_Welcome extends Controller
  22. {
  23. /**
  24. * The basic welcome message
  25. *
  26. * @access public
  27. * @return Response
  28. */
  29. public function action_index()
  30. {
  31. return Response::forge(View::forge('welcome/index'));
  32. }
  33. /**
  34. * A typical "Hello, Bob!" type example. This uses a ViewModel to
  35. * show how to use them.
  36. *
  37. * @access public
  38. * @return Response
  39. */
  40. public function action_hello()
  41. {
  42. return Response::forge(ViewModel::forge('welcome/hello'));
  43. }
  44. /**
  45. * The 404 action for the application.
  46. *
  47. * @access public
  48. * @return Response
  49. */
  50. public function action_404()
  51. {
  52. return Response::forge(ViewModel::forge('welcome/404'), 404);
  53. }
  54. }