Exemple #1
0
 public static function registerZend()
 {
     if (self::$zendLoaded) {
         return;
     }
     // Zend 1.8.0 and thereafter
     include_once 'Zend/Loader/Autoloader.php';
     $loader = Zend_Loader_Autoloader::getInstance();
     // NOT the default autoloader, Symfony's is the default.
     // Thanks to Guglielmo Celata
     // $loader->setFallbackAutoloader(true);
     $loader->suppressNotFoundWarnings(false);
     // Before Zend 1.8.0
     // require_once 'Zend/Loader.php';
     // Zend_Loader::registerAutoload();
     self::$zendLoaded = true;
 }
Exemple #2
0
 /**
  * DOCUMENT ME
  * @return mixed
  */
 public static function registerZend()
 {
     if (self::$zendLoaded) {
         return;
     }
     // Zend 1.8.0 and thereafter
     include_once 'Zend/Loader/Autoloader.php';
     $loader = Zend_Loader_Autoloader::getInstance();
     // NOT the default autoloader, Symfony's is the default.
     // Thanks to Guglielmo Celata
     // $loader->setFallbackAutoloader(true);
     $loader->suppressNotFoundWarnings(false);
     // Before Zend 1.8.0
     // require_once 'Zend/Loader.php';
     // Zend_Loader::registerAutoload();
     self::$zendLoaded = true;
     // UTF8 tokenizer can be turned off if you don't have now off by default because it is really, really ignorant of English,
     // it can't even cope with plural vs singular, much less stemming
     // Thanks to Fotis. Also thanks to the Zend Lucene source
     // for the second bit. iconv doesn't mean that PCRE was compiled
     // with support for Unicode character classes, which the Lucene
     // cross-language tokenizer requires to work. Lovely
     if (function_exists('iconv') && @preg_match('/\\pL/u', 'a') == 1) {
         Zend_Search_Lucene_Analysis_Analyzer::setDefault(new Zend_Search_Lucene_Analysis_Analyzer_Common_Utf8());
     }
 }