AuthTestController.php 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. <?php
  2. /**
  3. * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
  4. * Copyright 2005-2011, 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 2005-2011, 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. use Cake\Routing\Router;
  17. /**
  18. * AuthTestController class
  19. *
  20. */
  21. class AuthTestController extends Controller {
  22. /**
  23. * components property
  24. *
  25. * @var array
  26. */
  27. public $components = array('Auth');
  28. /**
  29. * testUrl property
  30. *
  31. * @var mixed
  32. */
  33. public $testUrl = null;
  34. /**
  35. * construct method
  36. */
  37. public function __construct($request = null, $response = null) {
  38. $request->addParams(Router::parse('/auth_test'));
  39. $request->here = '/auth_test';
  40. $request->webroot = '/';
  41. Router::setRequestInfo($request);
  42. parent::__construct($request, $response);
  43. }
  44. /**
  45. * login method
  46. *
  47. * @return void
  48. */
  49. public function login() {
  50. }
  51. /**
  52. * logout method
  53. *
  54. * @return void
  55. */
  56. public function logout() {
  57. }
  58. /**
  59. * add method
  60. *
  61. * @return void
  62. */
  63. public function add() {
  64. echo "add";
  65. }
  66. /**
  67. * view method
  68. *
  69. * @return void
  70. */
  71. public function view() {
  72. echo "view";
  73. }
  74. /**
  75. * add method
  76. *
  77. * @return void
  78. */
  79. public function camelCase() {
  80. echo "camelCase";
  81. }
  82. /**
  83. * redirect method
  84. *
  85. * @param mixed $url
  86. * @param mixed $status
  87. * @return void|\Cake\Network\Response
  88. */
  89. public function redirect($url, $status = null) {
  90. $this->testUrl = Router::url($url);
  91. return parent::redirect($url, $status);
  92. }
  93. /**
  94. * isAuthorized method
  95. *
  96. * @return void
  97. */
  98. public function isAuthorized() {
  99. }
  100. }