Update script with new autoloader header

This commit is contained in:
Michael RICOIS 2014-03-07 13:14:19 +00:00
parent ae05e6a3e5
commit f9cbbe1b39
8 changed files with 222 additions and 45 deletions

View File

@ -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 {

View File

@ -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(

View File

@ -1,35 +1,56 @@
<?php
// Define path to application directory
defined('APPLICATION_PATH')
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../../application'));
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../../application'));
// Define application environment
defined('APPLICATION_ENV')
|| define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));
|| define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));
// 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 {
$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) {

View File

@ -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 {

View File

@ -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';

View File

@ -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 {

View File

@ -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) {

View File

@ -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 {