1 | <?php |
||
5 | abstract class Node |
||
6 | { |
||
7 | const KIND_NAME = 'Name'; |
||
8 | const KIND_DOCUMENT = 'Document'; |
||
9 | const KIND_OPERATION_DEFINITION = 'OperationDefinition'; |
||
10 | const KIND_VARIABLE_DEFINITION = 'VariableDefinition'; |
||
11 | const KIND_VARIABLE = 'Variable'; |
||
12 | const KIND_SELECTION_SET = 'SelectionSet'; |
||
13 | const KIND_FIELD = 'Field'; |
||
14 | const KIND_ARGUMENT = 'Argument'; |
||
15 | const KIND_FRAGMENT_SPREAD = 'FragmentSpread'; |
||
16 | const KIND_INLINE_FRAGMENT = 'InlineFragment'; |
||
17 | const KIND_FRAGMENT_DEFINITION = 'FragmentDefinition'; |
||
18 | const KIND_INT_VALUE = 'IntValue'; |
||
19 | const KIND_FLOAT_VALUE = 'FloatValue'; |
||
20 | const KIND_STRING_VALUE = 'StringValue'; |
||
21 | const KIND_BOOLEAN_VALUE = 'BooleanValue'; |
||
22 | const KIND_ENUM_VALUE = 'EnumValue'; |
||
23 | const KIND_ARRAY_VALUE = 'ArrayValue'; |
||
24 | const KIND_OBJECT_VALUE = 'ObjectValue'; |
||
25 | const KIND_OBJECT_FIELD = 'ObjectField'; |
||
26 | const KIND_DIRECTIVE = 'Directive'; |
||
27 | const KIND_TYPE = 'Type'; |
||
28 | const KIND_LIST_TYPE = 'ListType'; |
||
29 | const KIND_NAMED_TYPE = 'NamedType'; |
||
30 | const KIND_NON_NULL_TYPE = 'NonNullType'; |
||
31 | |||
32 | const KIND = NULL; |
||
33 | |||
34 | /** |
||
35 | * @var \Fubhy\GraphQL\Language\Location|null |
||
36 | */ |
||
37 | protected $location; |
||
38 | |||
39 | /** |
||
40 | * @var array |
||
41 | */ |
||
42 | protected $attributes; |
||
43 | |||
44 | /** |
||
45 | * Constructor. |
||
46 | * |
||
47 | * @param \Fubhy\GraphQL\Language\Location|null $location |
||
48 | * @param array $attributes |
||
49 | */ |
||
50 | 309 | public function __construct(Location $location = NULL, array $attributes = []) |
|
55 | |||
56 | /** |
||
57 | * @return Location|null |
||
58 | */ |
||
59 | public function getLocation() |
||
63 | |||
64 | /** |
||
65 | * @param string $key |
||
66 | * |
||
67 | * @return bool |
||
68 | */ |
||
69 | public function has($key) |
||
73 | |||
74 | /** |
||
75 | * @param string $key |
||
76 | * @param null $default |
||
77 | * |
||
78 | * @return mixed |
||
79 | */ |
||
80 | 306 | public function get($key, $default = NULL) |
|
88 | |||
89 | /** |
||
90 | * @param string $key |
||
91 | * @param mixed $value |
||
92 | * |
||
93 | * @return $this |
||
94 | */ |
||
95 | public function set($key, $value) |
||
100 | |||
101 | /** |
||
102 | * @return string |
||
103 | */ |
||
104 | public function __toString() |
||
108 | } |
||
109 |