352 $contributors = array_map( |
352 $contributors = array_map( |
353 function($c) { unset($c['nameLiteral']); return $c; }, |
353 function($c) { unset($c['nameLiteral']); return $c; }, |
354 $this->getContributors() |
354 $this->getContributors() |
355 ); |
355 ); |
356 |
356 |
357 return [ |
357 $res = [ |
358 'id' => $this->getId(), |
358 'id' => $this->getId(), |
359 'uri' => $this->getUri(), |
359 'uri' => $this->getUri(), |
360 'title' => $this->getTitleValue(), |
360 'title' => $this->getTitleValue(), |
361 'language' => $this->getLanguageValue(), |
361 'language' => $this->getLanguageValue(), |
362 'language_resolved' => $this->getLanguageResolved(), |
|
363 'modified' => $this->getModifiedValue(), |
362 'modified' => $this->getModifiedValue(), |
364 'publishers' => $publishers, |
363 'publishers' => $publishers, |
365 'contributors' => $contributors, |
364 'contributors' => $contributors, |
366 'mediaArray'=> $mediaArray |
365 'mediaArray'=> $mediaArray |
367 ]; |
366 ]; |
|
367 |
|
368 if($this->language_resolved) { |
|
369 $res['language_resolved'] = $this->getLanguageResolved(); |
|
370 } |
|
371 |
|
372 return $res; |
368 } |
373 } |
369 } |
374 } |
370 |
375 |
371 } |
376 } |