AuthTestController.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <?php
  2. /**
  3. * AuthTestController
  4. *
  5. * PHP 5
  6. *
  7. * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
  8. * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
  9. *
  10. * Licensed under The MIT License
  11. * Redistributions of files must retain the above copyright notice.
  12. *
  13. * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
  14. * @link http://cakephp.org CakePHP(tm) Project
  15. * @since CakePHP(tm) v 3.0.0
  16. * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
  17. */
  18. namespace TestApp\Controller;
  19. use Cake\Controller\Controller;
  20. use Cake\Routing\Router;
  21. /**
  22. * AuthTestController class
  23. *
  24. */
  25. class AuthTestController extends Controller {
  26. /**
  27. * uses property
  28. *
  29. * @var array
  30. */
  31. public $uses = array('Users');
  32. /**
  33. * components property
  34. *
  35. * @var array
  36. */
  37. public $components = array('Session', 'Auth');
  38. /**
  39. * testUrl property
  40. *
  41. * @var mixed null
  42. */
  43. public $testUrl = null;
  44. /**
  45. * construct method
  46. */
  47. public function __construct($request = null, $response = null) {
  48. $request->addParams(Router::parse('/auth_test'));
  49. $request->here = '/auth_test';
  50. $request->webroot = '/';
  51. Router::setRequestInfo($request);
  52. parent::__construct($request, $response);
  53. }
  54. /**
  55. * login method
  56. *
  57. * @return void
  58. */
  59. public function login() {
  60. }
  61. /**
  62. * admin_login method
  63. *
  64. * @return void
  65. */
  66. public function admin_login() {
  67. }
  68. /**
  69. * admin_add method
  70. *
  71. * @return void
  72. */
  73. public function admin_add() {
  74. }
  75. /**
  76. * logout method
  77. *
  78. * @return void
  79. */
  80. public function logout() {
  81. }
  82. /**
  83. * add method
  84. *
  85. * @return void
  86. */
  87. public function add() {
  88. echo "add";
  89. }
  90. /**
  91. * add method
  92. *
  93. * @return void
  94. */
  95. public function camelCase() {
  96. echo "camelCase";
  97. }
  98. /**
  99. * redirect method
  100. *
  101. * @param mixed $url
  102. * @param mixed $status
  103. * @param mixed $exit
  104. * @return void
  105. */
  106. public function redirect($url, $status = null, $exit = true) {
  107. $this->testUrl = Router::url($url);
  108. return false;
  109. }
  110. /**
  111. * isAuthorized method
  112. *
  113. * @return void
  114. */
  115. public function isAuthorized() {
  116. }
  117. }