BackendApp.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Backend\App;
  7. /**
  8. * Backend Application which uses Magento Backend authentication process
  9. * @api
  10. * @since 100.0.2
  11. */
  12. class BackendApp
  13. {
  14. /**
  15. * @var null
  16. */
  17. private $cookiePath;
  18. /**
  19. * @var null
  20. */
  21. private $startupPage;
  22. /**
  23. * @var null
  24. */
  25. private $aclResourceName;
  26. /**
  27. * @param string $cookiePath
  28. * @param string $startupPage
  29. * @param string $aclResourceName
  30. */
  31. public function __construct(
  32. $cookiePath,
  33. $startupPage,
  34. $aclResourceName
  35. ) {
  36. $this->cookiePath = $cookiePath;
  37. $this->startupPage = $startupPage;
  38. $this->aclResourceName = $aclResourceName;
  39. }
  40. /**
  41. * Cookie path for the application to set cookie to
  42. *
  43. * @return string
  44. */
  45. public function getCookiePath()
  46. {
  47. return $this->cookiePath;
  48. }
  49. /**
  50. * Startup Page of the application to redirect after login
  51. *
  52. * @return string
  53. */
  54. public function getStartupPage()
  55. {
  56. return $this->startupPage;
  57. }
  58. /**
  59. * ACL resource name to authorize access to
  60. *
  61. * @return string
  62. */
  63. public function getAclResource()
  64. {
  65. return $this->aclResourceName;
  66. }
  67. }