Esempio n. 1
0
 private function getNewspapersLinks()
 {
     $files = $this->filesystem->allLinks(env('NEWSPAPERS_DIR'));
     $links = $files['links'];
     $files = $files['files'];
     $result = [];
     foreach ($links as $key => $file) {
         $parts = pathinfo($file);
         if ($parts['extension'] == 'pdf' || $parts['extension'] == 'json') {
             $name = explode('_', $parts['filename']);
             $link = $this->makeLinkAttributes($files[$key], $name, $parts);
             $result[$key] = $link;
         }
     }
     return $result;
 }
Esempio n. 2
0
 public function getCongressmen($year)
 {
     $year = $this->getYearString($year);
     $congressmen = $this->filesystem->congressmenLinks(env('PHOTOS_DIR') . DIRECTORY_SEPARATOR . $year);
     return $congressmen;
 }