1 | <?php |
||
19 | abstract class AbstractTypeDefinition extends AbstractDefinition implements TypeDefinition |
||
20 | { |
||
21 | use HasDirectives; |
||
22 | use HasDeprecation; |
||
23 | |||
24 | /** |
||
25 | * @var string |
||
26 | */ |
||
27 | protected $name; |
||
28 | |||
29 | /** |
||
30 | * @var string|null |
||
31 | */ |
||
32 | protected $description; |
||
33 | |||
34 | /** |
||
35 | * AbstractTypeDefinition constructor. |
||
36 | * @param Document $document |
||
37 | * @param string $name |
||
38 | */ |
||
39 | 2 | public function __construct(Document $document, string $name) |
|
47 | |||
48 | /** |
||
49 | * @return string |
||
50 | */ |
||
51 | public function getDescription(): string |
||
55 | |||
56 | /** |
||
57 | * @param null|string $description |
||
58 | */ |
||
59 | public function setDescription(?string $description): void |
||
63 | |||
64 | /** |
||
65 | * @param TypeDefinition $definition |
||
66 | * @return bool |
||
67 | */ |
||
68 | public function instanceOf(TypeDefinition $definition): bool |
||
72 | |||
73 | /** |
||
74 | * @return string |
||
75 | */ |
||
76 | 2 | public function getName(): string |
|
80 | |||
81 | /** |
||
82 | * @param string $type |
||
83 | * @return TypeDefinition |
||
84 | */ |
||
85 | protected function fetch(string $type): TypeDefinition |
||
89 | } |
||
90 |