| @@ 387-401 (lines=15) @@ | ||
| 384 | * @return integer The tax class ID |
|
| 385 | * @throws \Exception Is thrown, if the tax class with the requested name is not available |
|
| 386 | */ |
|
| 387 | public function getTaxClassIdByTaxClassName($taxClassName) |
|
| 388 | { |
|
| 389 | ||
| 390 | // query whether or not, the requested tax class is available |
|
| 391 | if (isset($this->taxClasses[$taxClassName])) { |
|
| 392 | return (integer) $this->taxClasses[$taxClassName][MemberNames::CLASS_ID]; |
|
| 393 | } |
|
| 394 | ||
| 395 | // throw an exception, if not |
|
| 396 | throw new \Exception( |
|
| 397 | $this->appendExceptionSuffix( |
|
| 398 | sprintf('Found invalid tax class name %s', $taxClassName) |
|
| 399 | ) |
|
| 400 | ); |
|
| 401 | } |
|
| 402 | ||
| 403 | /** |
|
| 404 | * Return's the store website for the passed code. |
|
| @@ 411-425 (lines=15) @@ | ||
| 408 | * @return integer The store website ID |
|
| 409 | * @throws \Exception Is thrown, if the store website with the requested code is not available |
|
| 410 | */ |
|
| 411 | public function getStoreWebsiteIdByCode($code) |
|
| 412 | { |
|
| 413 | ||
| 414 | // query whether or not, the requested store website is available |
|
| 415 | if (isset($this->storeWebsites[$code])) { |
|
| 416 | return (integer) $this->storeWebsites[$code][MemberNames::WEBSITE_ID]; |
|
| 417 | } |
|
| 418 | ||
| 419 | // throw an exception, if not |
|
| 420 | throw new \Exception( |
|
| 421 | $this->appendExceptionSuffix( |
|
| 422 | sprintf('Found invalid website code %s', $code) |
|
| 423 | ) |
|
| 424 | ); |
|
| 425 | } |
|
| 426 | ||
| 427 | /** |
|
| 428 | * Return's the category with the passed path. |
|
| @@ 272-286 (lines=15) @@ | ||
| 269 | * @return array The requested entity type |
|
| 270 | * @throws \Exception Is thrown, if the requested entity type is not available |
|
| 271 | */ |
|
| 272 | public function getEntityType() |
|
| 273 | { |
|
| 274 | ||
| 275 | // query whether or not the entity type with the passed code is available |
|
| 276 | if (isset($this->entityTypes[$entityTypeCode = $this->getEntityTypeCode()])) { |
|
| 277 | return $this->entityTypes[$entityTypeCode]; |
|
| 278 | } |
|
| 279 | ||
| 280 | // throw a new exception |
|
| 281 | throw new \Exception( |
|
| 282 | $this->appendExceptionSuffix( |
|
| 283 | sprintf('Requested entity type "%s" is not available', $entityTypeCode) |
|
| 284 | ) |
|
| 285 | ); |
|
| 286 | } |
|
| 287 | ||
| 288 | /** |
|
| 289 | * Return's TRUE, if the passed URL key varchar value IS related with the actual PK. |
|