SessionTestController.php 1000 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. /**
  3. * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
  4. * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  5. *
  6. * Licensed under The MIT License
  7. * Redistributions of files must retain the above copyright notice.
  8. *
  9. * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  10. * @link http://cakephp.org CakePHP(tm) Project
  11. * @since 3.0.0
  12. * @license http://www.opensource.org/licenses/mit-license.php MIT License
  13. */
  14. namespace TestApp\Controller;
  15. use Cake\Controller\Controller;
  16. /**
  17. * SessionTestController class
  18. *
  19. */
  20. class SessionTestController extends Controller {
  21. /**
  22. * uses property
  23. *
  24. * @var array
  25. */
  26. public $uses = array();
  27. /**
  28. * List of components
  29. *
  30. * @var array
  31. */
  32. public $components = ['Session'];
  33. /**
  34. * session_id method
  35. *
  36. * @return \Cake\Network\Response
  37. */
  38. public function session_id() {
  39. $this->response->body($this->Session->id());
  40. return $this->response;
  41. }
  42. }