| Total Complexity | 6 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | final class DefinitionRegistry implements IDefinitionRegistry |
||
| 13 | { |
||
| 14 | private static ?IDefinitionRegistry $instance = null; |
||
| 15 | |||
| 16 | /** @var ArrayObject<string, IServiceDefinition> */ |
||
| 17 | private readonly ArrayObject $definitions; |
||
| 18 | |||
| 19 | private function __construct( |
||
| 20 | ArrayObject $definitions = new ArrayObject(), |
||
| 21 | ) { |
||
| 22 | /** @var ArrayObject<string, IServiceDefinition> $definitions */ |
||
| 23 | $this->definitions = $definitions; |
||
|
|
|||
| 24 | } |
||
| 25 | |||
| 26 | public static function getInstance(): IDefinitionRegistry |
||
| 32 | } |
||
| 33 | |||
| 34 | public function load(): Traversable |
||
| 37 | } |
||
| 38 | |||
| 39 | public function bind(IServiceDefinition ...$serviceDefinitions): void |
||
| 46 |