|
@@ 184-186 (lines=3) @@
|
| 181 |
|
$nameParts = explode('/', $name); |
| 182 |
|
|
| 183 |
|
if ($this->getSpecificationVersion() === '3') { |
| 184 |
|
if (count($nameParts) < 4 || $nameParts[0] !== '#') { |
| 185 |
|
throw new InvalidDefinitionException('Invalid Component'); |
| 186 |
|
} |
| 187 |
|
|
| 188 |
|
if (!isset($this->jsonFile[$nameParts[1]][$nameParts[2]][$nameParts[3]])) { |
| 189 |
|
throw new DefinitionNotFoundException("Component'$name' not found"); |
|
@@ 195-197 (lines=3) @@
|
| 192 |
|
return $this->jsonFile[$nameParts[1]][$nameParts[2]][$nameParts[3]]; |
| 193 |
|
} |
| 194 |
|
|
| 195 |
|
if (count($nameParts) < 3 || $nameParts[0] !== '#') { |
| 196 |
|
throw new InvalidDefinitionException('Invalid Definition'); |
| 197 |
|
} |
| 198 |
|
|
| 199 |
|
if (!isset($this->jsonFile[$nameParts[1]][$nameParts[2]])) { |
| 200 |
|
throw new DefinitionNotFoundException("Definition '$name' not found"); |