|
0
|
1 |
<?php |
|
|
2 |
|
|
|
3 |
/* |
|
|
4 |
* This file is part of the Symfony framework. |
|
|
5 |
* |
|
|
6 |
* (c) Fabien Potencier <fabien@symfony.com> |
|
|
7 |
* |
|
|
8 |
* This source file is subject to the MIT license that is bundled |
|
|
9 |
* with this source code in the file LICENSE. |
|
|
10 |
*/ |
|
|
11 |
|
|
|
12 |
namespace Symfony\Component\DependencyInjection\Exception; |
|
|
13 |
|
|
|
14 |
/** |
|
|
15 |
* This exception is thrown when you try to create a service of an inactive scope. |
|
|
16 |
* |
|
|
17 |
* @author Johannes M. Schmitt <schmittjoh@gmail.com> |
|
|
18 |
*/ |
|
|
19 |
class InactiveScopeException extends RuntimeException |
|
|
20 |
{ |
|
|
21 |
private $serviceId; |
|
|
22 |
private $scope; |
|
|
23 |
|
|
|
24 |
public function __construct($serviceId, $scope) |
|
|
25 |
{ |
|
|
26 |
parent::__construct(sprintf('You cannot create a service ("%s") of an inactive scope ("%s").', $serviceId, $scope)); |
|
|
27 |
|
|
|
28 |
$this->serviceId = $serviceId; |
|
|
29 |
$this->scope = $scope; |
|
|
30 |
} |
|
|
31 |
|
|
|
32 |
public function getServiceId() |
|
|
33 |
{ |
|
|
34 |
return $this->serviceId; |
|
|
35 |
} |
|
|
36 |
|
|
|
37 |
public function getScope() |
|
|
38 |
{ |
|
|
39 |
return $this->scope; |
|
|
40 |
} |
|
|
41 |
} |