Example #1
0
 protected function _parseSourceIds($sourceIds)
 {
     $sourceIds = trim($sourceIds, ' []');
     $sourceIdArray = explode(',', $sourceIds);
     if (count($sourceIdArray) > 0 && $sourceIdArray[0] != '') {
         include_once HV_ROOT_DIR . '/../src/Database/ImgIndex.php';
         $imgIndex = new Database_ImgIndex();
         foreach ($sourceIdArray as $i => $sourceId) {
             $info = $imgIndex->getDatasourceInformationFromSourceId($sourceId);
             $imageLayersArray[$i] = array('uiLabels' => $info['uiLabels']);
         }
     } else {
         throw new Exception("Parameter 'sourceIds' must contain one or more data source identifiers.", 23);
     }
     return $imageLayersArray;
 }