1: <?php
2:
3: declare(strict_types=1);
4:
5: namespace PHPStan\BetterReflection\Reflector;
6:
7: use PHPStan\BetterReflection\Reflection\ReflectionClass;
8: use PHPStan\BetterReflection\Reflection\ReflectionConstant;
9: use PHPStan\BetterReflection\Reflection\ReflectionFunction;
10: use PHPStan\BetterReflection\Reflector\Exception\IdentifierNotFound;
11:
12: interface Reflector
13: {
14: /**
15: * Create a ReflectionClass for the specified $className.
16: *
17: * @throws IdentifierNotFound
18: */
19: public function reflectClass(string $identifierName): ReflectionClass;
20:
21: /**
22: * Get all the classes available in the scope specified by the SourceLocator.
23: *
24: * @return list<ReflectionClass>
25: */
26: public function reflectAllClasses(): iterable;
27:
28: /**
29: * Create a ReflectionFunction for the specified $functionName.
30: *
31: * @throws IdentifierNotFound
32: */
33: public function reflectFunction(string $identifierName): ReflectionFunction;
34:
35: /**
36: * Get all the functions available in the scope specified by the SourceLocator.
37: *
38: * @return list<ReflectionFunction>
39: */
40: public function reflectAllFunctions(): iterable;
41:
42: /**
43: * Create a ReflectionConstant for the specified $constantName.
44: *
45: * @throws IdentifierNotFound
46: */
47: public function reflectConstant(string $identifierName): ReflectionConstant;
48:
49: /**
50: * Get all the constants available in the scope specified by the SourceLocator.
51: *
52: * @return list<ReflectionConstant>
53: */
54: public function reflectAllConstants(): iterable;
55: }
56: