| @@ 270-284 (lines=15) @@ | ||
| 267 | * @return array The requested entity type |
|
| 268 | * @throws \Exception Is thrown, if the requested entity type is not available |
|
| 269 | */ |
|
| 270 | public function getEntityType() |
|
| 271 | { |
|
| 272 | ||
| 273 | // query whether or not the entity type with the passed code is available |
|
| 274 | if (isset($this->entityTypes[$entityTypeCode = $this->getEntityTypeCode()])) { |
|
| 275 | return $this->entityTypes[$entityTypeCode]; |
|
| 276 | } |
|
| 277 | ||
| 278 | // throw a new exception |
|
| 279 | throw new \Exception( |
|
| 280 | $this->appendExceptionSuffix( |
|
| 281 | sprintf('Requested entity type "%s" is not available', $entityTypeCode) |
|
| 282 | ) |
|
| 283 | ); |
|
| 284 | } |
|
| 285 | ||
| 286 | /** |
|
| 287 | * Return's TRUE, if the passed URL key varchar value IS related with the actual PK. |
|
| @@ 373-387 (lines=15) @@ | ||
| 370 | * @return integer The tax class ID |
|
| 371 | * @throws \Exception Is thrown, if the tax class with the requested name is not available |
|
| 372 | */ |
|
| 373 | public function getTaxClassIdByTaxClassName($taxClassName) |
|
| 374 | { |
|
| 375 | ||
| 376 | // query whether or not, the requested tax class is available |
|
| 377 | if (isset($this->taxClasses[$taxClassName])) { |
|
| 378 | return (integer) $this->taxClasses[$taxClassName][MemberNames::CLASS_ID]; |
|
| 379 | } |
|
| 380 | ||
| 381 | // throw an exception, if not |
|
| 382 | throw new \Exception( |
|
| 383 | $this->appendExceptionSuffix( |
|
| 384 | sprintf('Found invalid tax class name %s', $taxClassName) |
|
| 385 | ) |
|
| 386 | ); |
|
| 387 | } |
|
| 388 | ||
| 389 | /** |
|
| 390 | * Return's the store website for the passed code. |
|
| @@ 397-411 (lines=15) @@ | ||
| 394 | * @return integer The store website ID |
|
| 395 | * @throws \Exception Is thrown, if the store website with the requested code is not available |
|
| 396 | */ |
|
| 397 | public function getStoreWebsiteIdByCode($code) |
|
| 398 | { |
|
| 399 | ||
| 400 | // query whether or not, the requested store website is available |
|
| 401 | if (isset($this->storeWebsites[$code])) { |
|
| 402 | return (integer) $this->storeWebsites[$code][MemberNames::WEBSITE_ID]; |
|
| 403 | } |
|
| 404 | ||
| 405 | // throw an exception, if not |
|
| 406 | throw new \Exception( |
|
| 407 | $this->appendExceptionSuffix( |
|
| 408 | sprintf('Found invalid website code %s', $code) |
|
| 409 | ) |
|
| 410 | ); |
|
| 411 | } |
|
| 412 | ||
| 413 | /** |
|
| 414 | * Return's the category with the passed path. |
|