* This source file is subject to the new BSD license that is
 * available through the world-wide-web at this URL:
 * http://www.pimcore.org/license
 *
 * @copyright  Copyright (c) 2013 Weblizards GbR (http://www.weblizards.de)
 * @author     Thomas Keil <*****@*****.**>
 * @license    http://www.pimcore.org/license     New BSD License
 */
ini_set('memory_limit', '2048M');
set_time_limit(-1);
date_default_timezone_set("Europe/Berlin");
include_once dirname(__FILE__) . "/../../../pimcore/config/startup.php";
Pimcore::initAutoloader();
Pimcore::initConfiguration();
Pimcore::initLogger();
Pimcore::initPlugins();
$opts = new Zend_Console_Getopt(array('language|l=s' => "language", 'document|d=s' => "document"));
try {
    $opts->parse();
} catch (Exception $e) {
    Logger::critical($e->getMessage());
    die("Error: " . $e->getMessage());
}
$sphinx_config = SphinxSearch_Config::getInstance();
$documents = $sphinx_config->getDocumentsAsArray();
if (!array_key_exists($opts->document, $documents)) {
    SphinxSearch_Logger::err("Unknown document: " . $opts->document . "\n");
    print "Unknown document: " . $opts->document . "\n";
    print "Possible documents are:\n";
    foreach ($documents as $document_name => $document_config) {
        print $document_name . "\n";
예제 #2
0
파일: Tool.php 프로젝트: ngocanh/pimcore
 /**
  * resets the registry
  * @static
  * @return void
  */
 public static function resetRegistry()
 {
     $conf = Zend_Registry::get('pimcore_config_test');
     Zend_Registry::_unsetInstance();
     Zend_Registry::set('pimcore_config_test', $conf);
     Pimcore::initConfiguration();
     Pimcore::initPlugins();
 }