|
@@ 150-152 (lines=3) @@
|
| 147 |
|
$nameParts = explode('/', $name); |
| 148 |
|
|
| 149 |
|
if ($this->getSpecificationVersion() === '3') { |
| 150 |
|
if (count($nameParts) < 4 || $nameParts[0] !== '#') { |
| 151 |
|
throw new InvalidDefinitionException('Invalid Component'); |
| 152 |
|
} |
| 153 |
|
|
| 154 |
|
if (!isset($this->jsonFile[$nameParts[1]][$nameParts[2]][$nameParts[3]])) { |
| 155 |
|
throw new DefinitionNotFoundException("Component'$name' not found"); |
|
@@ 161-163 (lines=3) @@
|
| 158 |
|
return $this->jsonFile[$nameParts[1]][$nameParts[2]][$nameParts[3]]; |
| 159 |
|
} |
| 160 |
|
|
| 161 |
|
if (count($nameParts) < 3 || $nameParts[0] !== '#') { |
| 162 |
|
throw new InvalidDefinitionException('Invalid Definition'); |
| 163 |
|
} |
| 164 |
|
|
| 165 |
|
if (!isset($this->jsonFile[$nameParts[1]][$nameParts[2]])) { |
| 166 |
|
throw new DefinitionNotFoundException("Definition '$name' not found"); |