|
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; |
|
|
13 |
|
|
|
14 |
/** |
|
|
15 |
* Scope class. |
|
|
16 |
* |
|
|
17 |
* @author Johannes M. Schmitt <schmittjoh@gmail.com> |
|
|
18 |
* |
|
|
19 |
* @api |
|
|
20 |
*/ |
|
|
21 |
class Scope implements ScopeInterface |
|
|
22 |
{ |
|
|
23 |
private $name; |
|
|
24 |
private $parentName; |
|
|
25 |
|
|
|
26 |
/** |
|
|
27 |
* @api |
|
|
28 |
*/ |
|
|
29 |
public function __construct($name, $parentName = ContainerInterface::SCOPE_CONTAINER) |
|
|
30 |
{ |
|
|
31 |
$this->name = $name; |
|
|
32 |
$this->parentName = $parentName; |
|
|
33 |
} |
|
|
34 |
|
|
|
35 |
/** |
|
|
36 |
* @api |
|
|
37 |
*/ |
|
|
38 |
public function getName() |
|
|
39 |
{ |
|
|
40 |
return $this->name; |
|
|
41 |
} |
|
|
42 |
|
|
|
43 |
/** |
|
|
44 |
* @api |
|
|
45 |
*/ |
|
|
46 |
public function getParentName() |
|
|
47 |
{ |
|
|
48 |
return $this->parentName; |
|
|
49 |
} |
|
|
50 |
} |