diff --git a/scripts/jobs/filesGreffes.php b/scripts/jobs/filesGreffes.php index b54ebd759..7ddad2256 100644 --- a/scripts/jobs/filesGreffes.php +++ b/scripts/jobs/filesGreffes.php @@ -13,13 +13,34 @@ set_include_path(implode(PATH_SEPARATOR, array( get_include_path(), ))); -/** Zend_Application */ -require_once 'Zend/Application.php'; +//Use classmap autoloader - useful with opcode and realpath cache +require_once 'Zend/Loader/AutoloaderFactory.php'; +require_once 'Zend/Loader/ClassMapAutoloader.php'; +Zend_Loader_AutoloaderFactory::factory(array( + 'Zend_Loader_ClassMapAutoloader' => array( + __DIR__ . '/../../library/Zend/autoload_classmap.php', + __DIR__ . '/../../library/Application/autoload_classmap.php', + __DIR__ . '/../../library/Scores/autoload_classmap.php', + __DIR__ . '/../../application/autoload_classmap.php', + ), + 'Zend_Loader_StandardAutoloader' => array( + 'prefixes' => array( + 'Zend' => __DIR__ . '/../../library/Zend', + 'Application' => __DIR__ . '/../../library/Application', + 'Scores' => __DIR__ . '/../../library/Scores', + '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' + APPLICATION_ENV, + APPLICATION_PATH . '/configs/application.ini' ); try { diff --git a/scripts/jobs/getActes.php b/scripts/jobs/getActes.php index 4a5b7fe4c..67a9126ab 100644 --- a/scripts/jobs/getActes.php +++ b/scripts/jobs/getActes.php @@ -14,8 +14,29 @@ set_include_path(implode(PATH_SEPARATOR, array( get_include_path(), ))); -/** Zend_Application */ -require_once 'Zend/Application.php'; +//Use classmap autoloader - useful with opcode and realpath cache +require_once 'Zend/Loader/AutoloaderFactory.php'; +require_once 'Zend/Loader/ClassMapAutoloader.php'; +Zend_Loader_AutoloaderFactory::factory(array( + 'Zend_Loader_ClassMapAutoloader' => array( + __DIR__ . '/../../library/Zend/autoload_classmap.php', + __DIR__ . '/../../library/Application/autoload_classmap.php', + __DIR__ . '/../../library/Scores/autoload_classmap.php', + __DIR__ . '/../../application/autoload_classmap.php', + ), + 'Zend_Loader_StandardAutoloader' => array( + 'prefixes' => array( + 'Zend' => __DIR__ . '/../../library/Zend', + 'Application' => __DIR__ . '/../../library/Application', + 'Scores' => __DIR__ . '/../../library/Scores', + '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( diff --git a/scripts/jobs/getAltiScore.php b/scripts/jobs/getAltiScore.php index 0b85604ec..5dd846bc9 100644 --- a/scripts/jobs/getAltiScore.php +++ b/scripts/jobs/getAltiScore.php @@ -1,35 +1,56 @@ array( + __DIR__ . '/../../library/Zend/autoload_classmap.php', + __DIR__ . '/../../library/Application/autoload_classmap.php', + __DIR__ . '/../../library/Scores/autoload_classmap.php', + __DIR__ . '/../../application/autoload_classmap.php', + ), + 'Zend_Loader_StandardAutoloader' => array( + 'prefixes' => array( + 'Zend' => __DIR__ . '/../../library/Zend', + 'Application' => __DIR__ . '/../../library/Application', + 'Scores' => __DIR__ . '/../../library/Scores', + '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' + APPLICATION_ENV, + APPLICATION_PATH . '/configs/application.ini' ); try { $opts = new Zend_Console_Getopt( - //Options - array( - 'help|?' => "Affiche l'aide.", - 'cron' => "Mandatory for automatic mode", - 'get=s' => "Relance la commande pour un login", - ) + //Options + array( + 'help|?' => "Affiche l'aide.", + 'cron' => "Mandatory for automatic mode", + 'get=s' => "Relance la commande pour un login", + ) ); $opts->parse(); } catch (Zend_Console_Getopt_Exception $e) { diff --git a/scripts/jobs/greffeCmdCourrier.php b/scripts/jobs/greffeCmdCourrier.php index 736d385b3..fdbba27db 100644 --- a/scripts/jobs/greffeCmdCourrier.php +++ b/scripts/jobs/greffeCmdCourrier.php @@ -10,17 +10,38 @@ defined('APPLICATION_ENV') // Ensure library/ is on include_path set_include_path(implode(PATH_SEPARATOR, array( - realpath(APPLICATION_PATH . '/../library'), - get_include_path(), + realpath(APPLICATION_PATH . '/../library'), + get_include_path(), ))); -/** Zend_Application */ -require_once 'Zend/Application.php'; +//Use classmap autoloader - useful with opcode and realpath cache +require_once 'Zend/Loader/AutoloaderFactory.php'; +require_once 'Zend/Loader/ClassMapAutoloader.php'; +Zend_Loader_AutoloaderFactory::factory(array( + 'Zend_Loader_ClassMapAutoloader' => array( + __DIR__ . '/../../library/Zend/autoload_classmap.php', + __DIR__ . '/../../library/Application/autoload_classmap.php', + __DIR__ . '/../../library/Scores/autoload_classmap.php', + __DIR__ . '/../../application/autoload_classmap.php', + ), + 'Zend_Loader_StandardAutoloader' => array( + 'prefixes' => array( + 'Zend' => __DIR__ . '/../../library/Zend', + 'Application' => __DIR__ . '/../../library/Application', + 'Scores' => __DIR__ . '/../../library/Scores', + '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' + APPLICATION_ENV, + APPLICATION_PATH . '/configs/application.ini' ); try { diff --git a/scripts/jobs/greffeCmdMois.php b/scripts/jobs/greffeCmdMois.php index f3bd386c0..cade81077 100644 --- a/scripts/jobs/greffeCmdMois.php +++ b/scripts/jobs/greffeCmdMois.php @@ -14,6 +14,36 @@ set_include_path(implode(PATH_SEPARATOR, array( get_include_path(), ))); +//Use classmap autoloader - useful with opcode and realpath cache +require_once 'Zend/Loader/AutoloaderFactory.php'; +require_once 'Zend/Loader/ClassMapAutoloader.php'; +Zend_Loader_AutoloaderFactory::factory(array( + 'Zend_Loader_ClassMapAutoloader' => array( + __DIR__ . '/../../library/Zend/autoload_classmap.php', + __DIR__ . '/../../library/Application/autoload_classmap.php', + __DIR__ . '/../../library/Scores/autoload_classmap.php', + __DIR__ . '/../../application/autoload_classmap.php', + ), + 'Zend_Loader_StandardAutoloader' => array( + 'prefixes' => array( + 'Zend' => __DIR__ . '/../../library/Zend', + 'Application' => __DIR__ . '/../../library/Application', + 'Scores' => __DIR__ . '/../../library/Scores', + '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' +); + /** Zend_Application */ require_once 'Zend/Application.php'; diff --git a/scripts/jobs/greffeCmdTelechargement.php b/scripts/jobs/greffeCmdTelechargement.php index 3637a305c..68e1754ab 100644 --- a/scripts/jobs/greffeCmdTelechargement.php +++ b/scripts/jobs/greffeCmdTelechargement.php @@ -14,13 +14,34 @@ set_include_path(implode(PATH_SEPARATOR, array( get_include_path(), ))); -/** Zend_Application */ -require_once 'Zend/Application.php'; +//Use classmap autoloader - useful with opcode and realpath cache +require_once 'Zend/Loader/AutoloaderFactory.php'; +require_once 'Zend/Loader/ClassMapAutoloader.php'; +Zend_Loader_AutoloaderFactory::factory(array( + 'Zend_Loader_ClassMapAutoloader' => array( + __DIR__ . '/../../library/Zend/autoload_classmap.php', + __DIR__ . '/../../library/Application/autoload_classmap.php', + __DIR__ . '/../../library/Scores/autoload_classmap.php', + __DIR__ . '/../../application/autoload_classmap.php', + ), + 'Zend_Loader_StandardAutoloader' => array( + 'prefixes' => array( + 'Zend' => __DIR__ . '/../../library/Zend', + 'Application' => __DIR__ . '/../../library/Application', + 'Scores' => __DIR__ . '/../../library/Scores', + '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' + APPLICATION_ENV, + APPLICATION_PATH . '/configs/application.ini' ); try { diff --git a/scripts/jobs/removeTempFile.php b/scripts/jobs/removeTempFile.php index ca671dead..010286e0a 100644 --- a/scripts/jobs/removeTempFile.php +++ b/scripts/jobs/removeTempFile.php @@ -13,22 +13,43 @@ set_include_path(implode(PATH_SEPARATOR, array( get_include_path(), ))); -/** Zend_Application */ -require_once 'Zend/Application.php'; +//Use classmap autoloader - useful with opcode and realpath cache +require_once 'Zend/Loader/AutoloaderFactory.php'; +require_once 'Zend/Loader/ClassMapAutoloader.php'; +Zend_Loader_AutoloaderFactory::factory(array( + 'Zend_Loader_ClassMapAutoloader' => array( + __DIR__ . '/../../library/Zend/autoload_classmap.php', + __DIR__ . '/../../library/Application/autoload_classmap.php', + __DIR__ . '/../../library/Scores/autoload_classmap.php', + __DIR__ . '/../../application/autoload_classmap.php', + ), + 'Zend_Loader_StandardAutoloader' => array( + 'prefixes' => array( + 'Zend' => __DIR__ . '/../../library/Zend', + 'Application' => __DIR__ . '/../../library/Application', + 'Scores' => __DIR__ . '/../../library/Scores', + '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' + APPLICATION_ENV, + APPLICATION_PATH . '/configs/application.ini' ); try { $opts = new Zend_Console_Getopt( - //Options - array( - 'help|?' => "Display help.", - 'options|o' => " all: All files, [directory_name]: Files in this directory", - ) + //Options + array( + 'help|?' => "Display help.", + 'options|o' => " all: All files, [directory_name]: Files in this directory", + ) ); $opts->parse(); } catch (Zend_Console_Getopt_Exception $e) { diff --git a/scripts/jobs/sendBilanClient.php b/scripts/jobs/sendBilanClient.php index 3b8ec1372..665c0335c 100644 --- a/scripts/jobs/sendBilanClient.php +++ b/scripts/jobs/sendBilanClient.php @@ -9,17 +9,38 @@ defined('APPLICATION_ENV') // Ensure library/ is on include_path set_include_path(implode(PATH_SEPARATOR, array( - realpath(APPLICATION_PATH . '/../library'), - get_include_path(), + realpath(APPLICATION_PATH . '/../library'), + get_include_path(), ))); -/** Zend_Application */ -require_once 'Zend/Application.php'; +//Use classmap autoloader - useful with opcode and realpath cache +require_once 'Zend/Loader/AutoloaderFactory.php'; +require_once 'Zend/Loader/ClassMapAutoloader.php'; +Zend_Loader_AutoloaderFactory::factory(array( + 'Zend_Loader_ClassMapAutoloader' => array( + __DIR__ . '/../../library/Zend/autoload_classmap.php', + __DIR__ . '/../../library/Application/autoload_classmap.php', + __DIR__ . '/../../library/Scores/autoload_classmap.php', + __DIR__ . '/../../application/autoload_classmap.php', + ), + 'Zend_Loader_StandardAutoloader' => array( + 'prefixes' => array( + 'Zend' => __DIR__ . '/../../library/Zend', + 'Application' => __DIR__ . '/../../library/Application', + 'Scores' => __DIR__ . '/../../library/Scores', + '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' + APPLICATION_ENV, + APPLICATION_PATH . '/configs/application.ini' ); try {