1: <?php declare(strict_types = 1);
2:
3: namespace PHPStan\Reflection;
4:
5: /**
6: * This is the extension interface to implement if you want to dynamically
7: * mark methods as constructor. As opposed to simply list them in the configuration file.
8: *
9: * To register it in the configuration file use the `phpstan.additionalConstructorsExtension` service tag:
10: *
11: * ```
12: * services:
13: * -
14: * class: App\PHPStan\MyExtension
15: * tags:
16: * - phpstan.additionalConstructorsExtension
17: * ```
18: *
19: * @api
20: */
21: interface AdditionalConstructorsExtension
22: {
23:
24: public const EXTENSION_TAG = 'phpstan.additionalConstructorsExtension';
25:
26: /** @return string[] */
27: public function getAdditionalConstructors(ClassReflection $classReflection): array;
28:
29: }
30: