@@ 107-117 (lines=11) @@ | ||
104 | /** |
|
105 | * @return \Fubhy\GraphQL\Type\Definition\EnumValueDefinition[] |
|
106 | */ |
|
107 | protected function getValueLookup() |
|
108 | { |
|
109 | if (!isset($this->valueLookup)) { |
|
110 | $this->valueLookup = []; |
|
111 | foreach ($this->getValues() as $value) { |
|
112 | $this->valueLookup[$value->getValue()] = $value; |
|
113 | } |
|
114 | } |
|
115 | ||
116 | return $this->valueLookup; |
|
117 | } |
|
118 | ||
119 | /** |
|
120 | * @return \Fubhy\GraphQL\Type\Definition\EnumValueDefinition[] |
|
@@ 122-132 (lines=11) @@ | ||
119 | /** |
|
120 | * @return \Fubhy\GraphQL\Type\Definition\EnumValueDefinition[] |
|
121 | */ |
|
122 | protected function getNameLookup() |
|
123 | { |
|
124 | if (!isset($this->nameLookup)) { |
|
125 | $this->nameLookup = []; |
|
126 | foreach ($this->getValues() as $value) { |
|
127 | $this->nameLookup[$value->getName()] = $value; |
|
128 | } |
|
129 | } |
|
130 | ||
131 | return $this->nameLookup; |
|
132 | } |
|
133 | } |
|
134 |