Skip to content

Commit 3f81126

Browse files
committed
add CodeGeneratorRegistry
1 parent 5f7f2e1 commit 3f81126

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
3+
/**
4+
* @author Mohammed Moussaoui
5+
* @copyright Copyright (c) Mohammed Moussaoui. All rights reserved.
6+
* @license MIT License. For full license information see LICENSE file in the project root.
7+
* @link https://github.com/DevNet-Framework
8+
*/
9+
10+
namespace DevNet\Cli\Templating;
11+
12+
use DevNet\Cli\Commands\AbstractRegistry;
13+
14+
class CodeGeneratorRegistry extends AbstractRegistry
15+
{
16+
private static ?CodeGeneratorRegistry $instance = null;
17+
18+
public static function getSingleton(): static
19+
{
20+
if (!static::$instance) {
21+
static::$instance = new CodeGeneratorRegistry(ICodeGeneratorProvider::class);
22+
}
23+
24+
return static::$instance;
25+
}
26+
}

0 commit comments

Comments
 (0)