1 | <?php |
||
8 | class Reference implements ReferenceInterface |
||
9 | { |
||
10 | /** |
||
11 | * @var string |
||
12 | */ |
||
13 | private $target; |
||
14 | |||
15 | /** |
||
16 | * Constructs a Reference object targeting the $target entry. |
||
17 | * |
||
18 | * @param string $target |
||
19 | */ |
||
20 | public function __construct($target) |
||
24 | |||
25 | /** |
||
26 | * Returns the identifier for the object in the container. |
||
27 | * |
||
28 | * @return string |
||
29 | */ |
||
30 | public function getTarget() |
||
34 | |||
35 | /** |
||
36 | * Returns an InlineEntryInterface object representing the PHP code necessary to generate |
||
37 | * the container entry. |
||
38 | * |
||
39 | * @param string $containerVariable The name of the variable that allows access to the container instance. For instance: "$container", or "$this->container" |
||
40 | * @param array $usedVariables An array of variables that are already used and that should not be used when generating this code. |
||
41 | * |
||
42 | * @return InlineEntryInterface |
||
43 | */ |
||
44 | public function toPhpCode($containerVariable, array $usedVariables = array()) |
||
48 | } |
||
49 |