| @@ 305-319 (lines=15) @@ | ||
| 302 | * @return array The requested entity type |
|
| 303 | * @throws \Exception Is thrown, if the requested entity type is not available |
|
| 304 | */ |
|
| 305 | public function getEntityType() |
|
| 306 | { |
|
| 307 | ||
| 308 | // query whether or not the entity type with the passed code is available |
|
| 309 | if (isset($this->entityTypes[$entityTypeCode = $this->getEntityTypeCode()])) { |
|
| 310 | return $this->entityTypes[$entityTypeCode]; |
|
| 311 | } |
|
| 312 | ||
| 313 | // throw a new exception |
|
| 314 | throw new \Exception( |
|
| 315 | $this->appendExceptionSuffix( |
|
| 316 | sprintf('Requested entity type "%s" is not available', $entityTypeCode) |
|
| 317 | ) |
|
| 318 | ); |
|
| 319 | } |
|
| 320 | ||
| 321 | /** |
|
| 322 | * Return's TRUE, if the passed URL key varchar value IS related with the actual PK. |
|
| @@ 404-418 (lines=15) @@ | ||
| 401 | * @return integer The tax class ID |
|
| 402 | * @throws \Exception Is thrown, if the tax class with the requested name is not available |
|
| 403 | */ |
|
| 404 | public function getTaxClassIdByTaxClassName($taxClassName) |
|
| 405 | { |
|
| 406 | ||
| 407 | // query whether or not, the requested tax class is available |
|
| 408 | if (isset($this->taxClasses[$taxClassName])) { |
|
| 409 | return (integer) $this->taxClasses[$taxClassName][MemberNames::CLASS_ID]; |
|
| 410 | } |
|
| 411 | ||
| 412 | // throw an exception, if not |
|
| 413 | throw new \Exception( |
|
| 414 | $this->appendExceptionSuffix( |
|
| 415 | sprintf('Found invalid tax class name %s', $taxClassName) |
|
| 416 | ) |
|
| 417 | ); |
|
| 418 | } |
|
| 419 | ||
| 420 | /** |
|
| 421 | * Return's the store website for the passed code. |
|
| @@ 428-442 (lines=15) @@ | ||
| 425 | * @return integer The store website ID |
|
| 426 | * @throws \Exception Is thrown, if the store website with the requested code is not available |
|
| 427 | */ |
|
| 428 | public function getStoreWebsiteIdByCode($code) |
|
| 429 | { |
|
| 430 | ||
| 431 | // query whether or not, the requested store website is available |
|
| 432 | if (isset($this->storeWebsites[$code])) { |
|
| 433 | return (integer) $this->storeWebsites[$code][MemberNames::WEBSITE_ID]; |
|
| 434 | } |
|
| 435 | ||
| 436 | // throw an exception, if not |
|
| 437 | throw new \Exception( |
|
| 438 | $this->appendExceptionSuffix( |
|
| 439 | sprintf('Found invalid website code %s', $code) |
|
| 440 | ) |
|
| 441 | ); |
|
| 442 | } |
|
| 443 | ||
| 444 | /** |
|
| 445 | * Return's the category with the passed path. |
|