Drupal investigation

InactiveScopeException.php 1006B

123456789101112131415161718192021222324252627282930313233343536373839404142
  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\Exception;
  11. /**
  12. * This exception is thrown when you try to create a service of an inactive scope.
  13. *
  14. * @author Johannes M. Schmitt <schmittjoh@gmail.com>
  15. */
  16. class InactiveScopeException extends RuntimeException
  17. {
  18. private $serviceId;
  19. private $scope;
  20. public function __construct($serviceId, $scope, \Exception $previous = null)
  21. {
  22. parent::__construct(sprintf('You cannot create a service ("%s") of an inactive scope ("%s").', $serviceId, $scope), 0, $previous);
  23. $this->serviceId = $serviceId;
  24. $this->scope = $scope;
  25. }
  26. public function getServiceId()
  27. {
  28. return $this->serviceId;
  29. }
  30. public function getScope()
  31. {
  32. return $this->scope;
  33. }
  34. }