Zf1 with composer
This commit is contained in:
parent
ee931a3ada
commit
d6d2c5d0ff
@ -14,28 +14,11 @@ if (APPLICATION_ENV == 'development'){
|
||||
// --- Ensure library/ is on include_path
|
||||
set_include_path(implode(PATH_SEPARATOR, array(
|
||||
realpath(APPLICATION_PATH . '/../library'),
|
||||
realpath(APPLICATION_PATH . '/../vendor/zendframework/zendframework1/library'),
|
||||
get_include_path(),
|
||||
)));
|
||||
|
||||
require_once realpath(__DIR__ . '/../vendor/autoload.php');
|
||||
|
||||
// --- Use classmap autoloader - useful with opcode and realpath cache
|
||||
Zend_Loader_AutoloaderFactory::factory(array(
|
||||
'Zend_Loader_ClassMapAutoloader' => array(
|
||||
__DIR__ . '/../library/autoload_classmap.php',
|
||||
),
|
||||
'Zend_Loader_StandardAutoloader' => array(
|
||||
'prefixes' => array(
|
||||
'Application' => __DIR__ . '/../library/Application',
|
||||
'Scores' => __DIR__ . '/../library/Scores',
|
||||
'SdMetier' => __DIR__ . '/../library/SdMetier',
|
||||
'Metier' => __DIR__ . '/../library/Metier',
|
||||
),
|
||||
'fallback_autoloader' => true
|
||||
)
|
||||
));
|
||||
|
||||
// --- Create application, bootstrap, and run
|
||||
$application = new Zend_Application(APPLICATION_ENV, APPLICATION_PATH . '/configs/application.ini');
|
||||
$application->bootstrap()->run();
|
@ -1,35 +0,0 @@
|
||||
<?php
|
||||
// --- Define path to application directory
|
||||
defined('APPLICATION_PATH')
|
||||
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../../application'));
|
||||
|
||||
// --- Define application environment
|
||||
defined('APPLICATION_ENV')
|
||||
|| 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 . '/../vendor/zendframework/zendframework1/library'),
|
||||
realpath(APPLICATION_PATH . '/../library'),
|
||||
get_include_path(),
|
||||
)));
|
||||
|
||||
$dir = array(
|
||||
APPLICATION_PATH,
|
||||
APPLICATION_PATH."/../library/Application",
|
||||
APPLICATION_PATH."/../library/Scores",
|
||||
APPLICATION_PATH."/../library/SdMetier",
|
||||
);
|
||||
|
||||
$fileClassmap = APPLICATION_PATH . "/../library/autoload_classmap.php";
|
||||
$zendBinPath = APPLICATION_PATH . "/../vendor/zendframework/zendframework1/bin";
|
||||
|
||||
$i = 0;
|
||||
foreach($dir as $d) {
|
||||
$options = " -a";
|
||||
if ($i==0) {
|
||||
$options = " -w";
|
||||
}
|
||||
passthru("php ".__DIR__."/classmap_generator.php -l ".$d.$options." -o ".$fileClassmap);
|
||||
$i++;
|
||||
}
|
@ -1,252 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Zend Framework
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This source file is subject to the new BSD license that is bundled
|
||||
* with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://framework.zend.com/license/new-bsd
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@zend.com so we can send you a copy immediately.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Loader
|
||||
* @subpackage Exception
|
||||
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
|
||||
/**
|
||||
* Generate class maps for use with autoloading.
|
||||
*
|
||||
* Usage:
|
||||
* --help|-h Get usage message
|
||||
* --library|-l [ <string> ] Library to parse; if none provided, assumes
|
||||
* current directory
|
||||
* --output|-o [ <string> ] Where to write autoload file; if not provided,
|
||||
* assumes "autoload_classmap.php" in library directory
|
||||
* --append|-a Append to autoload file if it exists
|
||||
* --overwrite|-w Whether or not to overwrite existing autoload
|
||||
* file
|
||||
* --ignore|-i [ <string> ] Comma-separated namespaces to ignore
|
||||
*/
|
||||
|
||||
// --- Define path to application directory
|
||||
defined('APPLICATION_PATH')
|
||||
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../../application'));
|
||||
|
||||
// -- Ensure library/ is on include_path
|
||||
set_include_path(implode(PATH_SEPARATOR, array(
|
||||
realpath(APPLICATION_PATH . '/../vendor/zendframework/zendframework1/library'),
|
||||
get_include_path(),
|
||||
)));
|
||||
|
||||
$libPath = dirname(__FILE__) . '/../library';
|
||||
if (!is_dir($libPath)) {
|
||||
// Try to load StandardAutoloader from include_path
|
||||
if (false === include('Zend/Loader/StandardAutoloader.php')) {
|
||||
echo "Unable to locate autoloader via include_path; aborting" . PHP_EOL;
|
||||
exit(2);
|
||||
}
|
||||
} else {
|
||||
// Try to load StandardAutoloader from library
|
||||
if (false === include(dirname(__FILE__) . '/../library/Zend/Loader/StandardAutoloader.php')) {
|
||||
echo "Unable to locate autoloader via library; aborting" . PHP_EOL;
|
||||
exit(2);
|
||||
}
|
||||
}
|
||||
|
||||
$libraryPath = getcwd();
|
||||
|
||||
// Setup autoloading
|
||||
$loader = new Zend_Loader_StandardAutoloader(array('autoregister_zf' => true));
|
||||
$loader->setFallbackAutoloader(true);
|
||||
$loader->register();
|
||||
|
||||
$rules = array(
|
||||
'help|h' => 'Get usage message',
|
||||
'library|l-s' => 'Library to parse; if none provided, assumes current directory',
|
||||
'output|o-s' => 'Where to write autoload file; if not provided, assumes "autoload_classmap.php" in library directory',
|
||||
'append|a' => 'Append to autoload file if it exists',
|
||||
'overwrite|w' => 'Whether or not to overwrite existing autoload file',
|
||||
'ignore|i-s' => 'Comma-separated namespaces to ignore',
|
||||
);
|
||||
|
||||
try {
|
||||
$opts = new Zend_Console_Getopt($rules);
|
||||
$opts->parse();
|
||||
} catch (Zend_Console_Getopt_Exception $e) {
|
||||
echo $e->getUsageMessage();
|
||||
exit(2);
|
||||
}
|
||||
|
||||
if ($opts->getOption('h')) {
|
||||
echo $opts->getUsageMessage();
|
||||
exit(0);
|
||||
}
|
||||
|
||||
$ignoreNamespaces = array();
|
||||
if (isset($opts->i)) {
|
||||
$ignoreNamespaces = explode(',', $opts->i);
|
||||
}
|
||||
|
||||
$relativePathForClassmap = '';
|
||||
if (isset($opts->l)) {
|
||||
if (!is_dir($opts->l)) {
|
||||
echo 'Invalid library directory provided' . PHP_EOL
|
||||
. PHP_EOL;
|
||||
echo $opts->getUsageMessage();
|
||||
exit(2);
|
||||
}
|
||||
$libraryPath = $opts->l;
|
||||
}
|
||||
$libraryPath = str_replace(DIRECTORY_SEPARATOR, '/', realpath($libraryPath));
|
||||
|
||||
$usingStdout = false;
|
||||
$appending = $opts->getOption('a');
|
||||
$output = $libraryPath . '/autoload_classmap.php';
|
||||
if (isset($opts->o)) {
|
||||
$output = $opts->o;
|
||||
if ('-' == $output) {
|
||||
$output = STDOUT;
|
||||
$usingStdout = true;
|
||||
} elseif (is_dir($output)) {
|
||||
echo 'Invalid output file provided' . PHP_EOL
|
||||
. PHP_EOL;
|
||||
echo $opts->getUsageMessage();
|
||||
exit(2);
|
||||
} elseif (!is_writeable(dirname($output))) {
|
||||
echo "Cannot write to '$output'; aborting." . PHP_EOL
|
||||
. PHP_EOL
|
||||
. $opts->getUsageMessage();
|
||||
exit(2);
|
||||
} elseif (file_exists($output) && !$opts->getOption('w') && !$appending) {
|
||||
echo "Autoload file already exists at '$output'," . PHP_EOL
|
||||
. "but 'overwrite' or 'appending' flag was not specified; aborting." . PHP_EOL
|
||||
. PHP_EOL
|
||||
. $opts->getUsageMessage();
|
||||
exit(2);
|
||||
} else {
|
||||
// We need to add the $libraryPath into the relative path that is created in the classmap file.
|
||||
$classmapPath = str_replace(DIRECTORY_SEPARATOR, '/', realpath(dirname($output)));
|
||||
|
||||
// Simple case: $libraryPathCompare is in $classmapPathCompare
|
||||
if (strpos($libraryPath, $classmapPath) === 0) {
|
||||
$relativePathForClassmap = substr($libraryPath, strlen($classmapPath) + 1) . '/';
|
||||
} else {
|
||||
$libraryPathParts = explode('/', $libraryPath);
|
||||
$classmapPathParts = explode('/', $classmapPath);
|
||||
|
||||
// Find the common part
|
||||
$count = count($classmapPathParts);
|
||||
for ($i = 0; $i < $count; $i++) {
|
||||
if (!isset($libraryPathParts[$i]) || $libraryPathParts[$i] != $classmapPathParts[$i]) {
|
||||
// Common part end
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Add parent dirs for the subdirs of classmap
|
||||
$relativePathForClassmap = str_repeat('../', $count - $i);
|
||||
|
||||
// Add library subdirs
|
||||
$count = count($libraryPathParts);
|
||||
for (; $i < $count; $i++) {
|
||||
$relativePathForClassmap .= $libraryPathParts[$i] . '/';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!$usingStdout) {
|
||||
if ($appending) {
|
||||
echo "Appending to class file map '$output' for library in '$libraryPath'..." . PHP_EOL;
|
||||
} else {
|
||||
echo "Creating class file map for library in '$libraryPath'..." . PHP_EOL;
|
||||
}
|
||||
}
|
||||
|
||||
// Get the ClassFileLocator, and pass it the library path
|
||||
$l = new Zend_File_ClassFileLocator($libraryPath);
|
||||
|
||||
// Iterate over each element in the path, and create a map of
|
||||
// classname => filename, where the filename is relative to the library path
|
||||
$map = new stdClass;
|
||||
foreach ($l as $file) {
|
||||
$filename = str_replace($libraryPath . '/', '', str_replace(DIRECTORY_SEPARATOR, '/', $file->getPath()) . '/' . $file->getFilename());
|
||||
|
||||
// Add in relative path to library
|
||||
$filename = $relativePathForClassmap . $filename;
|
||||
|
||||
foreach ($file->getClasses() as $class) {
|
||||
foreach ($ignoreNamespaces as $ignoreNs) {
|
||||
if ($ignoreNs == substr($class, 0, strlen($ignoreNs))) {
|
||||
continue 2;
|
||||
}
|
||||
}
|
||||
|
||||
$map->{$class} = $filename;
|
||||
}
|
||||
}
|
||||
|
||||
if ($appending) {
|
||||
$content = var_export((array) $map, true) . ';';
|
||||
|
||||
// Prefix with dirname(__FILE__); modify the generated content
|
||||
$content = preg_replace("#(=> ')#", "=> dirname(__FILE__) . '/", $content);
|
||||
|
||||
// Fix \' strings from injected DIRECTORY_SEPARATOR usage in iterator_apply op
|
||||
$content = str_replace("\\'", "'", $content);
|
||||
|
||||
// Convert to an array and remove the first "array("
|
||||
$content = explode("\n", $content);
|
||||
array_shift($content);
|
||||
|
||||
// Load existing class map file and remove the closing "bracket ");" from it
|
||||
$existing = file($output, FILE_IGNORE_NEW_LINES);
|
||||
array_pop($existing);
|
||||
|
||||
// Merge
|
||||
$content = implode("\n", array_merge($existing, $content));
|
||||
} else {
|
||||
// Create a file with the class/file map.
|
||||
// Stupid syntax highlighters make separating < from PHP declaration necessary
|
||||
$content = '<' . "?php\n"
|
||||
. "// Generated by ZF's ./bin/classmap_generator.php\n"
|
||||
. 'return ' . var_export((array) $map, true) . ';';
|
||||
|
||||
// Prefix with dirname(__FILE__); modify the generated content
|
||||
$content = preg_replace("#(=> ')#", "=> dirname(__FILE__) . '/", $content);
|
||||
|
||||
// Fix \' strings from injected DIRECTORY_SEPARATOR usage in iterator_apply op
|
||||
$content = str_replace("\\'", "'", $content);
|
||||
}
|
||||
|
||||
// Remove unnecessary double-backslashes
|
||||
$content = str_replace('\\\\', '\\', $content);
|
||||
|
||||
// Exchange "array (" width "array("
|
||||
$content = str_replace('array (', 'array(', $content);
|
||||
|
||||
// Align "=>" operators to match coding standard
|
||||
preg_match_all('(\n\s+([^=]+)=>)', $content, $matches, PREG_SET_ORDER);
|
||||
$maxWidth = 0;
|
||||
|
||||
foreach ($matches as $match) {
|
||||
$maxWidth = max($maxWidth, strlen($match[1]));
|
||||
}
|
||||
|
||||
$content = preg_replace('(\n\s+([^=]+)=>)e', "'\n \\1' . str_repeat(' ', " . $maxWidth . " - strlen('\\1')) . '=>'", $content);
|
||||
|
||||
// Make the file end by EOL
|
||||
$content = rtrim($content, "\n") . "\n";
|
||||
|
||||
// Write the contents to disk
|
||||
file_put_contents($output, $content);
|
||||
|
||||
if (!$usingStdout) {
|
||||
echo "Wrote classmap file to '" . realpath($output) . "'" . PHP_EOL;
|
||||
}
|
@ -1,25 +1,14 @@
|
||||
--
|
||||
-- Structure de la table `utilisateurs_emails`
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `utilisateurs_emails` (
|
||||
`id` int(11) NOT NULL,
|
||||
`idClient` int(11) NOT NULL COMMENT 'ID du client',
|
||||
`login` varchar(50) NOT NULL COMMENT 'login de l''utilisateur',
|
||||
`emailName` varchar(50) NOT NULL DEFAULT '' COMMENT 'Nom à afficher',
|
||||
`email` varchar(255) NOT NULL COMMENT 'email de l''utilisateur',
|
||||
`account` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Email principal identique compte utilisateur',
|
||||
`pSurveillance` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'email à utiliser pour la prestation surveillance',
|
||||
`valid` tinyint(1) NOT NULL DEFAULT '0' COMMENT '1 si email validé',
|
||||
`validToken` varchar(40) NOT NULL DEFAULT '' COMMENT 'Clé généré pour la validation par lien de l''email'
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=10 DEFAULT CHARSET=latin1;
|
||||
|
||||
--
|
||||
-- Index pour les tables exportées
|
||||
--
|
||||
|
||||
--
|
||||
-- Index pour la table `utilisateurs_emails`
|
||||
--
|
||||
ALTER TABLE `utilisateurs_emails`
|
||||
ADD PRIMARY KEY (`id`);
|
||||
CREATE TABLE `utilisateurs_emails` (
|
||||
`id` int(11) NOT NULL,
|
||||
`idClient` int(11) NOT NULL COMMENT 'ID du client',
|
||||
`login` varchar(50) NOT NULL COMMENT 'login de l''utilisateur',
|
||||
`name` varchar(50) NOT NULL DEFAULT '' COMMENT 'Nom à afficher',
|
||||
`email` varchar(255) NOT NULL COMMENT 'email de l''utilisateur',
|
||||
`valid` tinyint(1) NOT NULL DEFAULT '0' COMMENT '1 si email valide',
|
||||
`validToken` varchar(40) NOT NULL DEFAULT '' COMMENT 'Clé pour la validation par lien de l''email',
|
||||
`dateInsert` datetime NOT NULL,
|
||||
`dateUpdate` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `idClient` (`idClient`),
|
||||
KEY `login` (`login`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
14
scripts/build/config/_sql/sdv1.utilisateurs_emails_surv.sql
Normal file
14
scripts/build/config/_sql/sdv1.utilisateurs_emails_surv.sql
Normal file
@ -0,0 +1,14 @@
|
||||
CREATE TABLE `utilisateurs_emails_surv` (
|
||||
`id` int(11) NOT NULL,
|
||||
`idClient` int(11) NOT NULL COMMENT 'ID du client',
|
||||
`login` varchar(50) NOT NULL COMMENT 'login de l''utilisateur',
|
||||
`name` varchar(50) NOT NULL DEFAULT '' COMMENT 'Nom à afficher',
|
||||
`email` varchar(255) NOT NULL COMMENT 'email de l''utilisateur',
|
||||
`valid` tinyint(1) NOT NULL DEFAULT '0' COMMENT '1 si email valide',
|
||||
`validToken` varchar(40) NOT NULL DEFAULT '' COMMENT 'Clé pour la validation par lien de l''email',
|
||||
`dateInsert` datetime NOT NULL,
|
||||
`dateUpdate` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `idClient` (`idClient`),
|
||||
KEY `login` (`login`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
// --- Define path to application directory
|
||||
defined('APPLICATION_PATH')
|
||||
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../../application'));
|
||||
|| define('APPLICATION_PATH', realpath(__DIR__ . '/../../application'));
|
||||
|
||||
// --- Define application environment
|
||||
defined('APPLICATION_ENV')
|
||||
@ -9,29 +9,11 @@ defined('APPLICATION_ENV')
|
||||
|
||||
// --- Ensure library/ is on include_path
|
||||
set_include_path(implode(PATH_SEPARATOR, array(
|
||||
realpath(APPLICATION_PATH . '/../library'),
|
||||
realpath(APPLICATION_PATH . '/../vendor/zendframework/zendframework1/library'),
|
||||
realpath(APPLICATION_PATH . '/../../library'),
|
||||
get_include_path(),
|
||||
)));
|
||||
|
||||
require_once realpath(APPLICATION_PATH . '/../vendor/autoload.php');
|
||||
|
||||
// --- Use classmap autoloader - useful with opcode and realpath cache
|
||||
Zend_Loader_AutoloaderFactory::factory(array(
|
||||
'Zend_Loader_ClassMapAutoloader' => array(
|
||||
__DIR__ . '/../../library/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
|
||||
)
|
||||
));
|
||||
require_once realpath(__DIR__ . '/../../vendor/autoload.php');
|
||||
|
||||
try {
|
||||
$opts = new Zend_Console_Getopt(
|
||||
@ -70,11 +52,8 @@ if ($opts->install)
|
||||
exit(1);
|
||||
}
|
||||
|
||||
// Create application, bootstrap, and run
|
||||
$application = new Zend_Application(
|
||||
APPLICATION_ENV,
|
||||
APPLICATION_PATH . '/configs/application.ini'
|
||||
);
|
||||
// --- Create application, bootstrap, and run
|
||||
$application = new Zend_Application(APPLICATION_ENV, APPLICATION_PATH . '/configs/application.ini');
|
||||
$c = new Zend_Config($application->getOptions());
|
||||
|
||||
//Create data directory and all his children
|
||||
|
@ -1,45 +1,22 @@
|
||||
<?php
|
||||
// Define path to application directory
|
||||
// --- Define path to application directory
|
||||
defined('APPLICATION_PATH')
|
||||
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../../application'));
|
||||
|| define('APPLICATION_PATH', realpath(__DIR__ . '/../../application'));
|
||||
|
||||
// Define application environment
|
||||
// --- Define application environment
|
||||
defined('APPLICATION_ENV')
|
||||
|| define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'development'));
|
||||
|| define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));
|
||||
|
||||
// Ensure library/ is on include_path
|
||||
// --- Ensure library/ is on include_path
|
||||
set_include_path(implode(PATH_SEPARATOR, array(
|
||||
realpath(APPLICATION_PATH . '/../library'),
|
||||
realpath(APPLICATION_PATH . '/../../library'),
|
||||
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/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
|
||||
)
|
||||
));
|
||||
require_once realpath(__DIR__ . '/../../vendor/autoload.php');
|
||||
|
||||
// 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'
|
||||
);
|
||||
// --- Create application, bootstrap, and run
|
||||
$application = new Zend_Application(APPLICATION_ENV, APPLICATION_PATH . '/configs/application.ini');
|
||||
|
||||
try {
|
||||
$opts = new Zend_Console_Getopt(
|
||||
|
@ -1,45 +1,22 @@
|
||||
<?php
|
||||
// Define path to application directory
|
||||
// --- Define path to application directory
|
||||
defined('APPLICATION_PATH')
|
||||
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../../application'));
|
||||
|| define('APPLICATION_PATH', realpath(__DIR__ . '/../../application'));
|
||||
|
||||
// Define application environment
|
||||
// --- Define application environment
|
||||
defined('APPLICATION_ENV')
|
||||
|| define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'development'));
|
||||
|| define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));
|
||||
|
||||
// Ensure library/ is on include_path
|
||||
// --- Ensure library/ is on include_path
|
||||
set_include_path(implode(PATH_SEPARATOR, array(
|
||||
realpath(APPLICATION_PATH . '/../library'),
|
||||
realpath(APPLICATION_PATH . '/../../library'),
|
||||
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/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
|
||||
)
|
||||
));
|
||||
require_once realpath(__DIR__ . '/../../vendor/autoload.php');
|
||||
|
||||
// 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'
|
||||
);
|
||||
// --- Create application, bootstrap, and run
|
||||
$application = new Zend_Application(APPLICATION_ENV, APPLICATION_PATH . '/configs/application.ini');
|
||||
|
||||
try {
|
||||
$opts = new Zend_Console_Getopt(
|
||||
|
@ -1,45 +1,22 @@
|
||||
<?php
|
||||
// Define path to application directory
|
||||
// --- Define path to application directory
|
||||
defined('APPLICATION_PATH')
|
||||
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../../application'));
|
||||
|| define('APPLICATION_PATH', realpath(__DIR__ . '/../../application'));
|
||||
|
||||
// Define application environment
|
||||
// --- Define application environment
|
||||
defined('APPLICATION_ENV')
|
||||
|| define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'development'));
|
||||
|| define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));
|
||||
|
||||
// Ensure library/ is on include_path
|
||||
// --- Ensure library/ is on include_path
|
||||
set_include_path(implode(PATH_SEPARATOR, array(
|
||||
realpath(APPLICATION_PATH . '/../library'),
|
||||
realpath(APPLICATION_PATH . '/../../library'),
|
||||
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/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
|
||||
)
|
||||
));
|
||||
require_once realpath(__DIR__ . '/../../vendor/autoload.php');
|
||||
|
||||
// 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'
|
||||
);
|
||||
// --- Create application, bootstrap, and run
|
||||
$application = new Zend_Application(APPLICATION_ENV, APPLICATION_PATH . '/configs/application.ini');
|
||||
|
||||
try {
|
||||
$opts = new Zend_Console_Getopt(
|
||||
|
@ -1,45 +1,22 @@
|
||||
<?php
|
||||
// Define path to application directory
|
||||
// --- Define path to application directory
|
||||
defined('APPLICATION_PATH')
|
||||
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../../application'));
|
||||
|| define('APPLICATION_PATH', realpath(__DIR__ . '/../../application'));
|
||||
|
||||
// Define application environment
|
||||
// --- Define application environment
|
||||
defined('APPLICATION_ENV')
|
||||
|| define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'development'));
|
||||
|| define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));
|
||||
|
||||
// Ensure library/ is on include_path
|
||||
// --- Ensure library/ is on include_path
|
||||
set_include_path(implode(PATH_SEPARATOR, array(
|
||||
realpath(APPLICATION_PATH . '/../library'),
|
||||
realpath(APPLICATION_PATH . '/../../library'),
|
||||
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/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
|
||||
)
|
||||
));
|
||||
require_once realpath(__DIR__ . '/../../vendor/autoload.php');
|
||||
|
||||
// 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'
|
||||
);
|
||||
// --- Create application, bootstrap, and run
|
||||
$application = new Zend_Application(APPLICATION_ENV, APPLICATION_PATH . '/configs/application.ini');
|
||||
|
||||
try {
|
||||
$opts = new Zend_Console_Getopt(
|
||||
|
@ -1,52 +1,22 @@
|
||||
<?php
|
||||
// Define path to application directory
|
||||
// --- Define path to application directory
|
||||
defined('APPLICATION_PATH')
|
||||
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../../application'));
|
||||
|| define('APPLICATION_PATH', realpath(__DIR__ . '/../../application'));
|
||||
|
||||
// Define application environment
|
||||
// --- Define application environment
|
||||
defined('APPLICATION_ENV')
|
||||
|| define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'development'));
|
||||
|| define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));
|
||||
|
||||
// Ensure library/ is on include_path
|
||||
// --- Ensure library/ is on include_path
|
||||
set_include_path(implode(PATH_SEPARATOR, array(
|
||||
realpath(APPLICATION_PATH . '/../library'),
|
||||
realpath(APPLICATION_PATH . '/../../library'),
|
||||
get_include_path(),
|
||||
)));
|
||||
|
||||
require_once realpath(__DIR__ . '/../../vendor/autoload.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/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'
|
||||
);
|
||||
|
||||
// require ../library/Zend/Mesvars.php
|
||||
|
||||
// --- Create application, bootstrap, and run
|
||||
$application = new Zend_Application(APPLICATION_ENV, APPLICATION_PATH . '/configs/application.ini');
|
||||
|
||||
try {
|
||||
$opts = new Zend_Console_Getopt(
|
||||
|
@ -1,44 +1,22 @@
|
||||
<?php
|
||||
ini_set('memory_limit', '1024M');
|
||||
error_reporting(E_ALL & ~E_NOTICE);
|
||||
|
||||
// Define path to application directory
|
||||
// --- Define path to application directory
|
||||
defined('APPLICATION_PATH')
|
||||
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../../application'));
|
||||
|| define('APPLICATION_PATH', realpath(__DIR__ . '/../../application'));
|
||||
|
||||
// Ensure library/ is on include_path
|
||||
// --- Define application environment
|
||||
defined('APPLICATION_ENV')
|
||||
|| 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'),
|
||||
realpath(APPLICATION_PATH . '/../../library'),
|
||||
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/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
|
||||
)
|
||||
));
|
||||
require_once realpath(__DIR__ . '/../../vendor/autoload.php');
|
||||
|
||||
// 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'
|
||||
);
|
||||
// --- Create application, bootstrap, and run
|
||||
$application = new Zend_Application(APPLICATION_ENV, APPLICATION_PATH . '/configs/application.ini');
|
||||
|
||||
$c = new Zend_Config($application->getOptions());
|
||||
Zend_Registry::set('config', $c);
|
||||
|
@ -1,45 +1,22 @@
|
||||
<?php
|
||||
// Define path to application directory
|
||||
// --- Define path to application directory
|
||||
defined('APPLICATION_PATH')
|
||||
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../../application'));
|
||||
|| define('APPLICATION_PATH', realpath(__DIR__ . '/../../application'));
|
||||
|
||||
// Define application environment
|
||||
// --- Define application environment
|
||||
defined('APPLICATION_ENV')
|
||||
|| define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));
|
||||
|
||||
// Ensure library/ is on include_path
|
||||
// --- Ensure library/ is on include_path
|
||||
set_include_path(implode(PATH_SEPARATOR, array(
|
||||
realpath(APPLICATION_PATH . '/../library'),
|
||||
realpath(APPLICATION_PATH . '/../../library'),
|
||||
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/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
|
||||
)
|
||||
));
|
||||
require_once realpath(__DIR__ . '/../../vendor/autoload.php');
|
||||
|
||||
// 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'
|
||||
);
|
||||
// --- Create application, bootstrap, and run
|
||||
$application = new Zend_Application(APPLICATION_ENV, APPLICATION_PATH . '/configs/application.ini');
|
||||
|
||||
try {
|
||||
$opts = new Zend_Console_Getopt(
|
||||
|
@ -1,45 +1,22 @@
|
||||
<?php
|
||||
// Define path to application directory
|
||||
// --- Define path to application directory
|
||||
defined('APPLICATION_PATH')
|
||||
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../../application'));
|
||||
|| define('APPLICATION_PATH', realpath(__DIR__ . '/../../application'));
|
||||
|
||||
// Define application environment
|
||||
// --- Define application environment
|
||||
defined('APPLICATION_ENV')
|
||||
|| define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));
|
||||
|
||||
// Ensure library/ is on include_path
|
||||
// --- 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(),
|
||||
)));
|
||||
|
||||
//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/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
|
||||
)
|
||||
));
|
||||
require_once realpath(__DIR__ . '/../../vendor/autoload.php');
|
||||
|
||||
// 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'
|
||||
);
|
||||
// --- Create application, bootstrap, and run
|
||||
$application = new Zend_Application(APPLICATION_ENV, APPLICATION_PATH . '/configs/application.ini');
|
||||
|
||||
try {
|
||||
$opts = new Zend_Console_Getopt(
|
||||
|
@ -1,45 +1,22 @@
|
||||
<?php
|
||||
// Define path to application directory
|
||||
// --- Define path to application directory
|
||||
defined('APPLICATION_PATH')
|
||||
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../../application'));
|
||||
|| define('APPLICATION_PATH', realpath(__DIR__ . '/../../application'));
|
||||
|
||||
// Define application environment
|
||||
// --- Define application environment
|
||||
defined('APPLICATION_ENV')
|
||||
|| define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));
|
||||
|
||||
// Ensure library/ is on include_path
|
||||
// --- Ensure library/ is on include_path
|
||||
set_include_path(implode(PATH_SEPARATOR, array(
|
||||
realpath(APPLICATION_PATH . '/../library'),
|
||||
realpath(APPLICATION_PATH . '/../../library'),
|
||||
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/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
|
||||
)
|
||||
));
|
||||
require_once realpath(__DIR__ . '/../../vendor/autoload.php');
|
||||
|
||||
// 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'
|
||||
);
|
||||
// --- Create application, bootstrap, and run
|
||||
$application = new Zend_Application(APPLICATION_ENV, APPLICATION_PATH . '/configs/application.ini');
|
||||
|
||||
try {
|
||||
$opts = new Zend_Console_Getopt(
|
||||
|
@ -1,45 +1,23 @@
|
||||
#!/usr/bin/php
|
||||
<?php
|
||||
// Define path to application directory
|
||||
// --- Define path to application directory
|
||||
defined('APPLICATION_PATH')
|
||||
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../../application'));
|
||||
|| define('APPLICATION_PATH', realpath(__DIR__ . '/../../application'));
|
||||
|
||||
// Define application environment
|
||||
define('APPLICATION_ENV', 'development');
|
||||
// --- Define application environment
|
||||
defined('APPLICATION_ENV')
|
||||
|| define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));
|
||||
|
||||
// Ensure library/ is on include_path
|
||||
// --- Ensure library/ is on include_path
|
||||
set_include_path(implode(PATH_SEPARATOR, array(
|
||||
realpath(APPLICATION_PATH . '/../library'),
|
||||
realpath(APPLICATION_PATH . '/../../library'),
|
||||
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/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
|
||||
)
|
||||
));
|
||||
require_once realpath(__DIR__ . '/../../vendor/autoload.php');
|
||||
|
||||
// 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'
|
||||
);
|
||||
// --- Create application, bootstrap, and run
|
||||
$application = new Zend_Application(APPLICATION_ENV, APPLICATION_PATH . '/configs/application.ini');
|
||||
|
||||
try {
|
||||
$opts = new Zend_Console_Getopt(
|
||||
|
@ -7,46 +7,24 @@
|
||||
*
|
||||
*/
|
||||
|
||||
// Define path to application directory
|
||||
// --- Define path to application directory
|
||||
defined('APPLICATION_PATH')
|
||||
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../../application'));
|
||||
|| define('APPLICATION_PATH', realpath(__DIR__ . '/../../application'));
|
||||
|
||||
// Define application environment
|
||||
define('APPLICATION_ENV', 'development');
|
||||
// --- Define application environment
|
||||
defined('APPLICATION_ENV')
|
||||
|| define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));
|
||||
|
||||
// Ensure library/ is on include_path
|
||||
// --- Ensure library/ is on include_path
|
||||
set_include_path(implode(PATH_SEPARATOR, array(
|
||||
realpath(APPLICATION_PATH . '/../library'),
|
||||
realpath(APPLICATION_PATH . '/../../library'),
|
||||
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/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
|
||||
)
|
||||
));
|
||||
require_once realpath(__DIR__ . '/../../vendor/autoload.php');
|
||||
|
||||
// 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'
|
||||
);
|
||||
// --- Create application, bootstrap, and run
|
||||
$application = new Zend_Application(APPLICATION_ENV, APPLICATION_PATH . '/configs/application.ini');
|
||||
|
||||
try {
|
||||
$opts = new Zend_Console_Getopt(
|
||||
|
@ -1,47 +1,24 @@
|
||||
<?php
|
||||
error_reporting(E_ALL & ~E_NOTICE);
|
||||
|
||||
// Define path to application directory
|
||||
// --- Define path to application directory
|
||||
defined('APPLICATION_PATH')
|
||||
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../../application'));
|
||||
|| define('APPLICATION_PATH', realpath(__DIR__ . '/../../application'));
|
||||
|
||||
// Define application environment
|
||||
// --- Define application environment
|
||||
defined('APPLICATION_ENV')
|
||||
|| define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));
|
||||
|
||||
// Ensure library/ is on include_path
|
||||
// --- Ensure library/ is on include_path
|
||||
set_include_path(implode(PATH_SEPARATOR, array(
|
||||
realpath(APPLICATION_PATH . '/../library'),
|
||||
realpath(APPLICATION_PATH . '/../../library'),
|
||||
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/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
|
||||
)
|
||||
));
|
||||
require_once realpath(__DIR__ . '/../../vendor/autoload.php');
|
||||
|
||||
// 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'
|
||||
);
|
||||
// --- Create application, bootstrap, and run
|
||||
$application = new Zend_Application(APPLICATION_ENV, APPLICATION_PATH . '/configs/application.ini');
|
||||
|
||||
$c = new Zend_Config($application->getOptions());
|
||||
Zend_Registry::set('config', $c);
|
||||
|
@ -1,45 +1,22 @@
|
||||
<?php
|
||||
// Define path to application directory
|
||||
// --- Define path to application directory
|
||||
defined('APPLICATION_PATH')
|
||||
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../../application'));
|
||||
|| define('APPLICATION_PATH', realpath(__DIR__ . '/../../application'));
|
||||
|
||||
// Define application environment
|
||||
// --- Define application environment
|
||||
defined('APPLICATION_ENV')
|
||||
|| define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));
|
||||
|
||||
// Ensure library/ is on include_path
|
||||
// --- Ensure library/ is on include_path
|
||||
set_include_path(implode(PATH_SEPARATOR, array(
|
||||
realpath(APPLICATION_PATH . '/../library'),
|
||||
realpath(APPLICATION_PATH . '/../../library'),
|
||||
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/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
|
||||
)
|
||||
));
|
||||
require_once realpath(__DIR__ . '/../../vendor/autoload.php');
|
||||
|
||||
// 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'
|
||||
);
|
||||
// --- Create application, bootstrap, and run
|
||||
$application = new Zend_Application(APPLICATION_ENV, APPLICATION_PATH . '/configs/application.ini');
|
||||
|
||||
try {
|
||||
$opts = new Zend_Console_Getopt(
|
||||
@ -72,9 +49,9 @@ try {
|
||||
$dbSlave = Zend_Db::factory(new Zend_Config(array(
|
||||
'adapter' => 'mysqli',
|
||||
'params' => array(
|
||||
'host' => '195.154.170.169:53336',
|
||||
'username' => 'root',
|
||||
'password' => 'scores',
|
||||
'host' => '195.154.170.169:3306',
|
||||
'username' => 'wsuser',
|
||||
'password' => 'wspass2012',
|
||||
'dbname' => 'sdv1',
|
||||
'driver_options' => array(
|
||||
MYSQLI_INIT_COMMAND => "SET NAMES utf8",
|
||||
|
Loading…
Reference in New Issue
Block a user