Ejemplo n.º 1
0
 /**
  * @return MillenniumDriver|Sierra|Marmot|DriverInterface|HorizonAPI
  */
 protected static function getCatalogDriver()
 {
     if (MarcRecord::$catalogDriver == null) {
         global $configArray;
         try {
             require_once ROOT_DIR . '/CatalogFactory.php';
             MarcRecord::$catalogDriver = CatalogFactory::getCatalogConnectionInstance();
         } catch (PDOException $e) {
             // What should we do with this error?
             if ($configArray['System']['debug']) {
                 echo '<pre>';
                 echo 'DEBUG: ' . $e->getMessage();
                 echo '</pre>';
             }
             return null;
         }
     }
     return MarcRecord::$catalogDriver;
 }