diff options
Diffstat (limited to 'vendor/doctrine/persistence/src/Persistence/Mapping/ReflectionService.php')
-rw-r--r-- | vendor/doctrine/persistence/src/Persistence/Mapping/ReflectionService.php | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/vendor/doctrine/persistence/src/Persistence/Mapping/ReflectionService.php b/vendor/doctrine/persistence/src/Persistence/Mapping/ReflectionService.php new file mode 100644 index 0000000..9484e1f --- /dev/null +++ b/vendor/doctrine/persistence/src/Persistence/Mapping/ReflectionService.php | |||
@@ -0,0 +1,75 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Doctrine\Persistence\Mapping; | ||
6 | |||
7 | use ReflectionClass; | ||
8 | use ReflectionProperty; | ||
9 | |||
10 | /** | ||
11 | * Very simple reflection service abstraction. | ||
12 | * | ||
13 | * This is required inside metadata layers that may require either | ||
14 | * static or runtime reflection. | ||
15 | */ | ||
16 | interface ReflectionService | ||
17 | { | ||
18 | /** | ||
19 | * Returns an array of the parent classes (not interfaces) for the given class. | ||
20 | * | ||
21 | * @psalm-param class-string $class | ||
22 | * | ||
23 | * @return string[] | ||
24 | * @psalm-return class-string[] | ||
25 | * | ||
26 | * @throws MappingException | ||
27 | */ | ||
28 | public function getParentClasses(string $class); | ||
29 | |||
30 | /** | ||
31 | * Returns the shortname of a class. | ||
32 | * | ||
33 | * @psalm-param class-string $class | ||
34 | * | ||
35 | * @return string | ||
36 | */ | ||
37 | public function getClassShortName(string $class); | ||
38 | |||
39 | /** | ||
40 | * @psalm-param class-string $class | ||
41 | * | ||
42 | * @return string | ||
43 | */ | ||
44 | public function getClassNamespace(string $class); | ||
45 | |||
46 | /** | ||
47 | * Returns a reflection class instance or null. | ||
48 | * | ||
49 | * @psalm-param class-string<T> $class | ||
50 | * | ||
51 | * @return ReflectionClass|null | ||
52 | * @psalm-return ReflectionClass<T>|null | ||
53 | * | ||
54 | * @template T of object | ||
55 | */ | ||
56 | public function getClass(string $class); | ||
57 | |||
58 | /** | ||
59 | * Returns an accessible property (setAccessible(true)) or null. | ||
60 | * | ||
61 | * @psalm-param class-string $class | ||
62 | * | ||
63 | * @return ReflectionProperty|null | ||
64 | */ | ||
65 | public function getAccessibleProperty(string $class, string $property); | ||
66 | |||
67 | /** | ||
68 | * Checks if the class have a public method with the given name. | ||
69 | * | ||
70 | * @psalm-param class-string $class | ||
71 | * | ||
72 | * @return bool | ||
73 | */ | ||
74 | public function hasPublicMethod(string $class, string $method); | ||
75 | } | ||