array( __DIR__ . '/../../library/Zend/autoload_classmap.php', __DIR__ . '/../../library/Application/autoload_classmap.php', __DIR__ . '/../../application/autoload_classmap.php', __DIR__ . '/../../library/Scores/autoload_classmap.php', __DIR__ . '/../../library/SdMetier/autoload_classmap.php', ), 'Zend_Loader_StandardAutoloader' => array( 'prefixes' => array( 'Zend' => __DIR__ . '/../../library/Zend', 'Application' => __DIR__ . '/../../library/Application', 'Scores' => __DIR__ . '/../../library/Scores', 'SdMetier' => __DIR__ . '/../../library/SdMetier', 'Metier' => __DIR__ . '/../../library/Metier', ), 'fallback_autoloader' => true ) )); // Zend_Application - Use it if you don't have autoloaders //require_once 'Zend/Application.php'; // Create application, bootstrap, and run $application = new Zend_Application( APPLICATION_ENV, APPLICATION_PATH . '/configs/application.ini' ); try { $opts = new Zend_Console_Getopt( //Options array( 'help|?' => "Aide.", 'compile-s' => "Génére le cache des règles, sans paramètres (tout), avec paramètres (VORD, VORP, PO)", 'version=s' => "Version des régles", ) ); $opts->parse(); } catch (Zend_Console_Getopt_Exception $e) { echo $e->getUsageMessage(); exit; } //Usage if( count($opts->getOptions())==0 || isset($opts->help)) { echo $opts->getUsageMessage(); exit; } $c = new Zend_Config($application->getOptions()); $db = Zend_Db::factory($c->profil->db->metier); Zend_Db_Table::setDefaultAdapter($db); $types = array('VORD', 'VORP', 'PO'); if ( $otps->compile!='' && in_array($opts->compile, $types) ) { $types = array($opts->compile); } if ( count($types) > 0 ) { foreach ( $types as $type ) { $ruleSfrM = new SdMetier_Sfr_Compile(); $ruleSfrM->setVersion($opts->version); $ruleSfrM->construct($type); } }