예제 #1
0
 public function getRecordData($id)
 {
     $finds = new Finds();
     $data = $finds->getSolrData($id);
     foreach ($data['0'] as $key => $value) {
         if (is_null($value) || $value === "") {
             unset($data['0'][$key]);
         }
     }
     if (array_key_exists('datefound1', $data['0'])) {
         $df1 = $this->todatestamp($data['0']['datefound1']);
         $data['0']['datefound1'] = $df1;
     }
     if (array_key_exists('datefound2', $data['0'])) {
         $df2 = $this->todatestamp($data['0']['datefound2']);
         $data['0']['datefound2'] = $df2;
     }
     if (array_key_exists('created', $data['0'])) {
         $created = $this->todatestamp($data['0']['created']);
         $data['0']['created'] = $created;
     }
     if (array_key_exists('updated', $data['0'])) {
         $updated = $this->todatestamp($data['0']['updated']);
         $data['0']['updated'] = $updated;
     }
     return $data;
 }