Scope.php 864B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. /*
  3. * This file is part of the Symfony framework.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * This source file is subject to the MIT license that is bundled
  8. * with this source code in the file LICENSE.
  9. */
  10. namespace Symfony\Component\DependencyInjection;
  11. /**
  12. * Scope class.
  13. *
  14. * @author Johannes M. Schmitt <schmittjoh@gmail.com>
  15. *
  16. * @api
  17. */
  18. class Scope implements ScopeInterface
  19. {
  20. private $name;
  21. private $parentName;
  22. /**
  23. * @api
  24. */
  25. public function __construct($name, $parentName = ContainerInterface::SCOPE_CONTAINER)
  26. {
  27. $this->name = $name;
  28. $this->parentName = $parentName;
  29. }
  30. /**
  31. * @api
  32. */
  33. public function getName()
  34. {
  35. return $this->name;
  36. }
  37. /**
  38. * @api
  39. */
  40. public function getParentName()
  41. {
  42. return $this->parentName;
  43. }
  44. }