AuthTestController.php 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  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('Session', '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. * admin_login method
  53. *
  54. * @return void
  55. */
  56. public function admin_login() {
  57. }
  58. /**
  59. * admin_add method
  60. *
  61. * @return void
  62. */
  63. public function admin_add() {
  64. }
  65. /**
  66. * logout method
  67. *
  68. * @return void
  69. */
  70. public function logout() {
  71. }
  72. /**
  73. * add method
  74. *
  75. * @return void
  76. */
  77. public function add() {
  78. echo "add";
  79. }
  80. /**
  81. * add method
  82. *
  83. * @return void
  84. */
  85. public function camelCase() {
  86. echo "camelCase";
  87. }
  88. /**
  89. * redirect method
  90. *
  91. * @param mixed $url
  92. * @param mixed $status
  93. * @return void|\Cake\Network\Response
  94. */
  95. public function redirect($url, $status = null) {
  96. $this->testUrl = Router::url($url);
  97. return parent::redirect($url, $status);
  98. }
  99. /**
  100. * isAuthorized method
  101. *
  102. * @return void
  103. */
  104. public function isAuthorized() {
  105. }
  106. }