Advertisement
Guest User

Untitled

a guest
Apr 19th, 2020
84
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.65 KB | None
  1. <?php
  2. declare(strict_types=1);
  3.  
  4. /**
  5. * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
  6. * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
  7. *
  8. * Licensed under The MIT License
  9. * For full copyright and license information, please see the LICENSE.txt
  10. * Redistributions of files must retain the above copyright notice.
  11. *
  12. * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
  13. * @link https://cakephp.org CakePHP(tm) Project
  14. * @since 0.2.9
  15. * @license https://opensource.org/licenses/mit-license.php MIT License
  16. */
  17. namespace App\Controller;
  18.  
  19. use Cake\Controller\Controller;
  20.  
  21. /**
  22. * Application Controller
  23. *
  24. * Add your application-wide methods in the class below, your controllers
  25. * will inherit them.
  26. *
  27. * @link https://book.cakephp.org/4/en/controllers.html#the-app-controller
  28. */
  29. class AppController extends Controller
  30. {
  31. /**
  32. * Initialization hook method.
  33. *
  34. * Use this method to add common initialization code like loading components.
  35. *
  36. * e.g. `$this->loadComponent('FormProtection');`
  37. *
  38. * @return void
  39. */
  40. public function initialize(): void
  41. {
  42.  
  43. parent::initialize();
  44. $this->loadComponent('RequestHandler');
  45. $this->loadComponent('Flash');
  46. $this->loadComponent('Authentication.Authentication');
  47.  
  48. /*
  49. * Enable the following component for recommended CakePHP form protection settings.
  50. * see https://book.cakephp.org/4/en/controllers/components/form-protection.html
  51. */
  52. //$this->loadComponent('FormProtection');
  53. }
  54. }
Advertisement
RAW Paste Data Copied
Advertisement