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