AuthTestController.php 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  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. /**
  24. * components property
  25. *
  26. * @var array
  27. */
  28. public $components = ['Auth'];
  29. /**
  30. * testUrl property
  31. *
  32. * @var mixed
  33. */
  34. public $testUrl = null;
  35. /**
  36. * construct method
  37. */
  38. public function __construct($request = null, $response = null)
  39. {
  40. $request->addParams(Router::parse('/auth_test'));
  41. $request->here = '/auth_test';
  42. $request->webroot = '/';
  43. Router::setRequestInfo($request);
  44. parent::__construct($request, $response);
  45. }
  46. /**
  47. * login method
  48. *
  49. * @return void
  50. */
  51. public function login()
  52. {
  53. }
  54. /**
  55. * logout method
  56. *
  57. * @return void
  58. */
  59. public function logout()
  60. {
  61. }
  62. /**
  63. * add method
  64. *
  65. * @return void
  66. */
  67. public function add()
  68. {
  69. echo "add";
  70. }
  71. /**
  72. * view method
  73. *
  74. * @return void
  75. */
  76. public function view()
  77. {
  78. echo "view";
  79. }
  80. /**
  81. * add method
  82. *
  83. * @return void
  84. */
  85. public function camelCase()
  86. {
  87. echo "camelCase";
  88. }
  89. /**
  90. * redirect method
  91. *
  92. * @param mixed $url
  93. * @param mixed $status
  94. * @return void|\Cake\Network\Response
  95. */
  96. public function redirect($url, $status = null)
  97. {
  98. $this->testUrl = Router::url($url);
  99. return parent::redirect($url, $status);
  100. }
  101. /**
  102. * isAuthorized method
  103. *
  104. * @return void
  105. */
  106. public function isAuthorized()
  107. {
  108. }
  109. }