Exemplo n.º 1
0
 public function __construct(Search_Index_Interface $searchIndex, $logWriter = null)
 {
     if (!$logWriter instanceof Zend_Log_Writer_Abstract) {
         $logWriter = new Zend_Log_Writer_Null();
     }
     $logWriter->setFormatter(new Zend_Log_Formatter_Simple(Zend_Log_Formatter_Simple::DEFAULT_FORMAT . ' [%memoryUsage% bytes]' . PHP_EOL));
     $this->log = new Zend_Log($logWriter);
     $this->searchIndex = $searchIndex;
     $api = new TikiAddons_Api_Search();
     $this->addonSources = $api->getAddonSources();
 }
Exemplo n.º 2
0
 private static function initializeSearchApi($package)
 {
     if (!empty(self::$installed[$package]->api->search->addonSources)) {
         $sources = self::$installed[$package]->api->search->addonSources;
         TikiAddons_Api_Search::setAddonSources($package, $sources);
     }
 }