@@ 389-412 (lines=24) @@ | ||
386 | * |
|
387 | * @return array with more details on the authors(s). |
|
388 | */ |
|
389 | private function loadAuthorDetails($author) |
|
390 | { |
|
391 | if (is_array($author) && is_array(array_values($author)[0])) { |
|
392 | return $author; |
|
393 | } |
|
394 | ||
395 | if (!is_array($author)) { |
|
396 | $tmp = $author; |
|
397 | $author = []; |
|
398 | $author[] = $tmp; |
|
399 | } |
|
400 | ||
401 | $authors = []; |
|
402 | foreach ($author as $acronym) { |
|
403 | if (isset($this->author[$acronym])) { |
|
404 | $key = $this->author[$acronym]; |
|
405 | $authors[$acronym] = $this->meta[$key]; |
|
406 | } else { |
|
407 | $authors[$acronym]["acronym"] = $acronym; |
|
408 | } |
|
409 | } |
|
410 | ||
411 | return $authors; |
|
412 | } |
|
413 | ||
414 | ||
415 | ||
@@ 452-475 (lines=24) @@ | ||
449 | * |
|
450 | * @return array with more details on the category(s). |
|
451 | */ |
|
452 | private function loadCategoryDetails($category) |
|
453 | { |
|
454 | if (is_array($category) && is_array(array_values($category)[0])) { |
|
455 | return $category; |
|
456 | } |
|
457 | ||
458 | if (!is_array($category)) { |
|
459 | $tmp = $category; |
|
460 | $category = []; |
|
461 | $category[] = $tmp; |
|
462 | } |
|
463 | ||
464 | $categorys = []; |
|
465 | foreach ($category as $catKey) { |
|
466 | if (isset($this->category[$catKey])) { |
|
467 | $key = $this->category[$catKey]; |
|
468 | $categorys[$catKey] = $this->meta[$key]; |
|
469 | } else { |
|
470 | $categorys[$catKey]["key"] = $catKey; |
|
471 | } |
|
472 | } |
|
473 | ||
474 | return $categorys; |
|
475 | } |
|
476 | ||
477 | ||
478 |