コード例 #1
0
ファイル: SolrDefault.php プロジェクト: grharry/vufind
 /**
  * Constructor
  *
  * @param \Zend\Config\Config $mainConfig     VuFind main configuration (omit for
  * built-in defaults)
  * @param \Zend\Config\Config $recordConfig   Record-specific configuration file
  * (omit to use $mainConfig as $recordConfig)
  * @param \Zend\Config\Config $searchSettings Search-specific configuration file
  */
 public function __construct($mainConfig = null, $recordConfig = null, $searchSettings = null)
 {
     // Turn on highlighting/snippets as needed:
     $this->highlight = !isset($searchSettings->General->highlighting) ? false : $searchSettings->General->highlighting;
     $this->snippet = !isset($searchSettings->General->snippets) ? false : $searchSettings->General->snippets;
     // Load snippet caption settings:
     if (isset($searchSettings->Snippet_Captions) && count($searchSettings->Snippet_Captions) > 0) {
         foreach ($searchSettings->Snippet_Captions as $key => $value) {
             $this->snippetCaptions[$key] = $value;
         }
     }
     // Container-contents linking
     $this->containerLinking = !isset($mainConfig->Hierarchy->simpleContainerLinks) ? false : $mainConfig->Hierarchy->simpleContainerLinks;
     parent::__construct($mainConfig, $recordConfig);
 }