1 | <?php |
||
19 | final class TypesManager extends AbstractPluginManager |
||
20 | { |
||
21 | /** |
||
22 | * @var array |
||
23 | */ |
||
24 | protected $factories = [ |
||
25 | InArrayType::class => InvokableFactory::class, |
||
26 | RegexType::class => InvokableFactory::class, |
||
27 | IntegerType::class => InvokableFactory::class, |
||
28 | FloatType::class => InvokableFactory::class, |
||
29 | StringType::class => InvokableFactory::class, |
||
30 | ]; |
||
31 | |||
32 | /** |
||
33 | * @var array |
||
34 | */ |
||
35 | protected $aliases = [ |
||
36 | 'inarray' => InArrayType::class, |
||
37 | 'regex' => RegexType::class, |
||
38 | 'integer' => IntegerType::class, |
||
39 | 'float' => FloatType::class, |
||
40 | 'string' => StringType::class, |
||
41 | ]; |
||
42 | |||
43 | /** |
||
44 | * Whether or not to share by default; default to false |
||
45 | * |
||
46 | * @var bool |
||
47 | */ |
||
48 | protected $shareByDefault = false; |
||
49 | |||
50 | /** |
||
51 | * Validate the plugin |
||
52 | * |
||
53 | * Checks that the type loaded is instance of SettingTypeInterface. |
||
54 | * |
||
55 | * @param SettingTypeInterface $type |
||
56 | * |
||
57 | * @return void |
||
58 | * @throws \RuntimeException if invalid |
||
59 | */ |
||
60 | 13 | public function validate($type) |
|
71 | } |
||
72 |