Scope.php 877 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  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. }