1 | <?php |
||
11 | class CallbackWrapperDefinition implements DumpableInterface |
||
12 | { |
||
13 | /** |
||
14 | * The identifier of the instance in the container. |
||
15 | * |
||
16 | * @var string|null |
||
17 | */ |
||
18 | private $identifier; |
||
19 | |||
20 | /** |
||
21 | * @var DumpableInterface |
||
22 | */ |
||
23 | private $wrappedDefinition; |
||
24 | |||
25 | /** |
||
26 | * @param null|string $identifier |
||
27 | * @param DumpableInterface $wrappedDefinition |
||
28 | */ |
||
29 | public function __construct($identifier, DumpableInterface $wrappedDefinition) |
||
34 | |||
35 | |||
36 | /** |
||
37 | * Returns the identifier for this object in the container. |
||
38 | * If null, classes consuming this definition should assume the definition must be inlined. |
||
39 | * |
||
40 | * @return string|null |
||
41 | */ |
||
42 | public function getIdentifier() |
||
46 | |||
47 | /** |
||
48 | * Returns an InlineEntryInterface object representing the PHP code necessary to generate |
||
49 | * the container entry. |
||
50 | * |
||
51 | * @param string $containerVariable The name of the variable that allows access to the container instance. For instance: "$container", or "$this->container" |
||
52 | * @param array $usedVariables An array of variables that are already used and that should not be used when generating this code. |
||
53 | * |
||
54 | * @return InlineEntryInterface |
||
55 | */ |
||
56 | public function toPhpCode($containerVariable, array $usedVariables = array()) |
||
65 | } |
||
66 |