server/src/app/Services/ViafResolver.php
changeset 133 821253d361d1
parent 23 037687868bc4
child 524 85e8382852e7
equal deleted inserted replaced
132:d97eda8bc8ec 133:821253d361d1
   105      * Get a list of names from an array of viaf ids.
   105      * Get a list of names from an array of viaf ids.
   106      * @param array $ids The array of ids to resolve.
   106      * @param array $ids The array of ids to resolve.
   107      *                   Each id can be an url starting with http://viaf.org/viaf/
   107      *                   Each id can be an url starting with http://viaf.org/viaf/
   108      */
   108      */
   109     public function getNames(array $ids) {
   109     public function getNames(array $ids) {
       
   110 
       
   111         if(count($ids) > config('corpusparole.viaf_max_ids')) {
       
   112             throw new ViafResolverException("Too manys ids provided");
       
   113         }
       
   114 
   110         return array_combine($ids, array_map([$this,'getName'], $ids));
   115         return array_combine($ids, array_map([$this,'getName'], $ids));
   111     }
   116     }
   112 
   117 
   113 
   118 
   114 }
   119 }