1: <?php declare(strict_types = 1);
2:
3: namespace PHPStan\Reflection;
4:
5: use PHPStan\TrinaryLogic;
6: use PHPStan\Type\Type;
7:
8: /**
9: * The purpose of this interface is to be able to
10: * answer more questions about properties
11: * without breaking backward compatibility
12: * with existing PropertiesClassReflectionExtension.
13: *
14: * Developers are meant to only implement PropertyReflection
15: * and its methods in their code.
16: *
17: * New methods on ExtendedPropertyReflection will be added
18: * in minor versions.
19: *
20: * @api
21: */
22: interface ExtendedPropertyReflection extends PropertyReflection
23: {
24:
25: public const HOOK_GET = 'get';
26:
27: public const HOOK_SET = 'set';
28:
29: public function getName(): string;
30:
31: public function hasPhpDocType(): bool;
32:
33: public function getPhpDocType(): Type;
34:
35: public function hasNativeType(): bool;
36:
37: public function getNativeType(): Type;
38:
39: public function isAbstract(): TrinaryLogic;
40:
41: public function isFinalByKeyword(): TrinaryLogic;
42:
43: public function isFinal(): TrinaryLogic;
44:
45: public function isVirtual(): TrinaryLogic;
46:
47: /**
48: * @param self::HOOK_* $hookType
49: */
50: public function hasHook(string $hookType): bool;
51:
52: /**
53: * @param self::HOOK_* $hookType
54: */
55: public function getHook(string $hookType): ExtendedMethodReflection;
56:
57: public function isProtectedSet(): bool;
58:
59: public function isPrivateSet(): bool;
60:
61: /**
62: * @return list<AttributeReflection>
63: */
64: public function getAttributes(): array;
65:
66: }
67:
OSZAR »