1 | <?php |
||
8 | class ConstParameterDefinition implements DumpableInterface |
||
9 | { |
||
10 | /** |
||
11 | * The identifier of the instance in the container. |
||
12 | * |
||
13 | * @var string |
||
14 | */ |
||
15 | private $identifier; |
||
16 | |||
17 | /** |
||
18 | * The name of the constant. If it is a class constant, please pass the FQDN. For instance: "My\Class::CONSTANT". |
||
19 | * |
||
20 | * @var string |
||
21 | */ |
||
22 | private $const; |
||
23 | |||
24 | /** |
||
25 | * Constructs an instance definition. |
||
26 | * |
||
27 | * @param string|null $identifier The identifier of the entry in the container. Can be null if the entry is anonymous (declared inline in other instances) |
||
28 | * @param string $const The name of the constant. If it is a class constant, please pass the FQDN. For instance: "My\Class::CONSTANT" |
||
29 | */ |
||
30 | public function __construct($identifier, $const) |
||
31 | { |
||
32 | $this->identifier = $identifier; |
||
33 | $this->const = $const; |
||
34 | } |
||
35 | |||
36 | /** |
||
37 | * Returns the identifier of the instance. |
||
38 | * |
||
39 | * @return string |
||
40 | */ |
||
41 | public function getIdentifier() |
||
45 | |||
46 | /** |
||
47 | * The name of the constant. If it is a class constant, please pass the FQDN. For instance: "My\Class::CONSTANT". |
||
48 | * |
||
49 | * @return mixed |
||
50 | */ |
||
51 | public function getConst() |
||
55 | |||
56 | /** |
||
57 | * Returns an InlineEntryInterface object representing the PHP code necessary to generate |
||
58 | * the container entry. |
||
59 | * |
||
60 | * @param string $containerVariable The name of the variable that allows access to the container instance. For instance: "$container", or "$this->container" |
||
61 | * @param array $usedVariables An array of variables that are already used and that should not be used when generating this code. |
||
62 | * |
||
63 | * @return InlineEntryInterface |
||
64 | */ |
||
65 | public function toPhpCode($containerVariable, array $usedVariables = array()) |
||
69 | } |
||
70 |