| @@ 371-394 (lines=24) @@ | ||
| 368 | * |
|
| 369 | * @return array with more details on the authors(s). |
|
| 370 | */ |
|
| 371 | private function loadAuthorDetails($author) |
|
| 372 | { |
|
| 373 | if (is_array($author) && is_array(array_values($author)[0])) { |
|
| 374 | return $author; |
|
| 375 | } |
|
| 376 | ||
| 377 | if (!is_array($author)) { |
|
| 378 | $tmp = $author; |
|
| 379 | $author = []; |
|
| 380 | $author[] = $tmp; |
|
| 381 | } |
|
| 382 | ||
| 383 | $authors = []; |
|
| 384 | foreach ($author as $acronym) { |
|
| 385 | if (isset($this->author[$acronym])) { |
|
| 386 | $key = $this->author[$acronym]; |
|
| 387 | $authors[$acronym] = $this->meta[$key]; |
|
| 388 | } else { |
|
| 389 | $authors[$acronym]["acronym"] = $acronym; |
|
| 390 | } |
|
| 391 | } |
|
| 392 | ||
| 393 | return $authors; |
|
| 394 | } |
|
| 395 | ||
| 396 | ||
| 397 | ||
| @@ 434-457 (lines=24) @@ | ||
| 431 | * |
|
| 432 | * @return array with more details on the category(s). |
|
| 433 | */ |
|
| 434 | private function loadCategoryDetails($category) |
|
| 435 | { |
|
| 436 | if (is_array($category) && is_array(array_values($category)[0])) { |
|
| 437 | return $category; |
|
| 438 | } |
|
| 439 | ||
| 440 | if (!is_array($category)) { |
|
| 441 | $tmp = $category; |
|
| 442 | $category = []; |
|
| 443 | $category[] = $tmp; |
|
| 444 | } |
|
| 445 | ||
| 446 | $categorys = []; |
|
| 447 | foreach ($category as $catKey) { |
|
| 448 | if (isset($this->category[$catKey])) { |
|
| 449 | $key = $this->category[$catKey]; |
|
| 450 | $categorys[$catKey] = $this->meta[$key]; |
|
| 451 | } else { |
|
| 452 | $categorys[$catKey]["key"] = $catKey; |
|
| 453 | } |
|
| 454 | } |
|
| 455 | ||
| 456 | return $categorys; |
|
| 457 | } |
|
| 458 | ||
| 459 | ||
| 460 | ||