@@ 198-200 (lines=3) @@ | ||
195 | $nameParts = explode('/', $name); |
|
196 | ||
197 | if ($this->getSpecificationVersion() === '3') { |
|
198 | if (count($nameParts) < 4 || $nameParts[0] !== '#') { |
|
199 | throw new InvalidDefinitionException('Invalid Component'); |
|
200 | } |
|
201 | ||
202 | if (!isset($this->jsonFile[$nameParts[1]][$nameParts[2]][$nameParts[3]])) { |
|
203 | throw new DefinitionNotFoundException("Component'$name' not found"); |
|
@@ 209-211 (lines=3) @@ | ||
206 | return $this->jsonFile[$nameParts[1]][$nameParts[2]][$nameParts[3]]; |
|
207 | } |
|
208 | ||
209 | if (count($nameParts) < 3 || $nameParts[0] !== '#') { |
|
210 | throw new InvalidDefinitionException('Invalid Definition'); |
|
211 | } |
|
212 | ||
213 | if (!isset($this->jsonFile[$nameParts[1]][$nameParts[2]])) { |
|
214 | throw new DefinitionNotFoundException("Definition '$name' not found"); |