| @@ 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. |
|
| @@ 382-396 (lines=15) @@ | ||
| 379 | * @return integer The tax class ID |
|
| 380 | * @throws \Exception Is thrown, if the tax class with the requested name is not available |
|
| 381 | */ |
|
| 382 | public function getTaxClassIdByTaxClassName($taxClassName) |
|
| 383 | { |
|
| 384 | ||
| 385 | // query whether or not, the requested tax class is available |
|
| 386 | if (isset($this->taxClasses[$taxClassName])) { |
|
| 387 | return (integer) $this->taxClasses[$taxClassName][MemberNames::CLASS_ID]; |
|
| 388 | } |
|
| 389 | ||
| 390 | // throw an exception, if not |
|
| 391 | throw new \Exception( |
|
| 392 | $this->appendExceptionSuffix( |
|
| 393 | sprintf('Found invalid tax class name %s', $taxClassName) |
|
| 394 | ) |
|
| 395 | ); |
|
| 396 | } |
|
| 397 | ||
| 398 | /** |
|
| 399 | * Return's the store website for the passed code. |
|
| @@ 406-420 (lines=15) @@ | ||
| 403 | * @return integer The store website ID |
|
| 404 | * @throws \Exception Is thrown, if the store website with the requested code is not available |
|
| 405 | */ |
|
| 406 | public function getStoreWebsiteIdByCode($code) |
|
| 407 | { |
|
| 408 | ||
| 409 | // query whether or not, the requested store website is available |
|
| 410 | if (isset($this->storeWebsites[$code])) { |
|
| 411 | return (integer) $this->storeWebsites[$code][MemberNames::WEBSITE_ID]; |
|
| 412 | } |
|
| 413 | ||
| 414 | // throw an exception, if not |
|
| 415 | throw new \Exception( |
|
| 416 | $this->appendExceptionSuffix( |
|
| 417 | sprintf('Found invalid website code %s', $code) |
|
| 418 | ) |
|
| 419 | ); |
|
| 420 | } |
|
| 421 | ||
| 422 | /** |
|
| 423 | * Return's the category with the passed path. |
|