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