Container.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. namespace TYPO3\PharStreamWrapper\Phar;
  3. /*
  4. * This file is part of the TYPO3 project.
  5. *
  6. * It is free software; you can redistribute it and/or modify it under the terms
  7. * of the MIT License (MIT). For the full copyright and license information,
  8. * please read the LICENSE file that was distributed with this source code.
  9. *
  10. * The TYPO3 project - inspiring people to share!
  11. */
  12. class Container
  13. {
  14. /**
  15. * @var Stub
  16. */
  17. private $stub;
  18. /**
  19. * @var Manifest
  20. */
  21. private $manifest;
  22. /**
  23. * @param Stub $stub
  24. * @param Manifest $manifest
  25. */
  26. public function __construct(Stub $stub, Manifest $manifest)
  27. {
  28. $this->stub = $stub;
  29. $this->manifest = $manifest;
  30. }
  31. /**
  32. * @return Stub
  33. */
  34. public function getStub()
  35. {
  36. return $this->stub;
  37. }
  38. /**
  39. * @return Manifest
  40. */
  41. public function getManifest()
  42. {
  43. return $this->manifest;
  44. }
  45. /**
  46. * @return string
  47. */
  48. public function getAlias()
  49. {
  50. return $this->manifest->getAlias() ?: $this->stub->getMappedAlias();
  51. }
  52. }