TestAuthComponent.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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\Component;
  15. use Cake\Controller\Component\AuthComponent;
  16. /**
  17. * TestAuthComponent class
  18. *
  19. */
  20. class TestAuthComponent extends AuthComponent
  21. {
  22. /**
  23. * Helper method to add/set an authenticate object instance
  24. *
  25. * @param int $index The index at which to add/set the object
  26. * @param Object $object The object to add/set
  27. * @return void
  28. */
  29. public function setAuthenticateObject($index, $object)
  30. {
  31. $this->_authenticateObjects[$index] = $object;
  32. }
  33. /**
  34. * Helper method to add/set an authorize object instance
  35. *
  36. * @param int $index The index at which to add/set the object
  37. * @param Object $object The object to add/set
  38. * @return void
  39. */
  40. public function setAuthorizeObject($index, $object)
  41. {
  42. $this->_authorizeObjects[$index] = $object;
  43. }
  44. }