PlaintextController.php 537 B

1234567891011121314151617181920212223242526
  1. <?php
  2. App::uses('AppController', 'Controller');
  3. class PlaintextController extends AppController {
  4. public function index() {
  5. $this->autoRender = false;
  6. $this->response->type('text');
  7. $this->response->body('Hello, World!');
  8. return $this->response;
  9. /*
  10. * Because this test is focused on routing we don't involve the view.
  11. *
  12. * Normally we would create a template file index.ctp containing "Hello, World!"
  13. * in app/View/Plaintext and:
  14. *
  15. $this->autoLayout = false;
  16. $this->response->type('text');
  17. */
  18. }
  19. }