| @@ 440-454 (lines=15) @@ | ||
| 437 | * @return integer The tax class ID |
|
| 438 | * @throws \Exception Is thrown, if the tax class with the requested name is not available |
|
| 439 | */ |
|
| 440 | public function getTaxClassIdByTaxClassName($taxClassName) |
|
| 441 | { |
|
| 442 | ||
| 443 | // query whether or not, the requested tax class is available |
|
| 444 | if (isset($this->taxClasses[$taxClassName])) { |
|
| 445 | return (integer) $this->taxClasses[$taxClassName][MemberNames::CLASS_ID]; |
|
| 446 | } |
|
| 447 | ||
| 448 | // throw an exception, if not |
|
| 449 | throw new \Exception( |
|
| 450 | $this->appendExceptionSuffix( |
|
| 451 | sprintf('Found invalid tax class name %s', $taxClassName) |
|
| 452 | ) |
|
| 453 | ); |
|
| 454 | } |
|
| 455 | ||
| 456 | /** |
|
| 457 | * Return's the store website for the passed code. |
|
| @@ 464-478 (lines=15) @@ | ||
| 461 | * @return integer The store website ID |
|
| 462 | * @throws \Exception Is thrown, if the store website with the requested code is not available |
|
| 463 | */ |
|
| 464 | public function getStoreWebsiteIdByCode($code) |
|
| 465 | { |
|
| 466 | ||
| 467 | // query whether or not, the requested store website is available |
|
| 468 | if (isset($this->storeWebsites[$code])) { |
|
| 469 | return (integer) $this->storeWebsites[$code][MemberNames::WEBSITE_ID]; |
|
| 470 | } |
|
| 471 | ||
| 472 | // throw an exception, if not |
|
| 473 | throw new \Exception( |
|
| 474 | $this->appendExceptionSuffix( |
|
| 475 | sprintf('Found invalid website code %s', $code) |
|
| 476 | ) |
|
| 477 | ); |
|
| 478 | } |
|
| 479 | ||
| 480 | /** |
|
| 481 | * Return's the category with the passed path. |
|
| @@ 353-367 (lines=15) @@ | ||
| 350 | * @return array The requested entity type |
|
| 351 | * @throws \Exception Is thrown, if the requested entity type is not available |
|
| 352 | */ |
|
| 353 | protected function getEntityType() |
|
| 354 | { |
|
| 355 | ||
| 356 | // query whether or not the entity type with the passed code is available |
|
| 357 | if (isset($this->entityTypes[$entityTypeCode = $this->getEntityTypeCode()])) { |
|
| 358 | return $this->entityTypes[$entityTypeCode]; |
|
| 359 | } |
|
| 360 | ||
| 361 | // throw a new exception |
|
| 362 | throw new \Exception( |
|
| 363 | $this->appendExceptionSuffix( |
|
| 364 | sprintf('Requested entity type "%s" is not available', $entityTypeCode) |
|
| 365 | ) |
|
| 366 | ); |
|
| 367 | } |
|
| 368 | ||
| 369 | /** |
|
| 370 | * Return's TRUE, if the passed URL key varchar value IS related with the passed PK. |
|