HelloWorldController.php 537 B

1234567891011121314151617181920212223242526
  1. <?php
  2. /**
  3. * Lithium: the most rad php framework
  4. *
  5. * @copyright Copyright 2013, Union of RAD (http://union-of-rad.org)
  6. * @license http://opensource.org/licenses/bsd-license.php The BSD License
  7. */
  8. namespace app\controllers;
  9. class HelloWorldController extends \lithium\action\Controller {
  10. public function index() {
  11. return $this->render(array('layout' => false));
  12. }
  13. public function to_string() {
  14. return "Hello World";
  15. }
  16. public function to_json() {
  17. return $this->render(array('json' => 'Hello World'));
  18. }
  19. }
  20. ?>