Merge from 1.1
This commit is contained in:
commit
771a3fa41c
248
bin/classmap_generator.php
Normal file
248
bin/classmap_generator.php
Normal file
@ -0,0 +1,248 @@
|
||||
<?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
|
||||
*/
|
||||
|
||||
$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);
|
||||
}
|
||||
}
|
||||
|
||||
// Ensure library/ is on include_path
|
||||
set_include_path(implode(PATH_SEPARATOR, array(
|
||||
realpath($libPath),
|
||||
get_include_path(),
|
||||
)));
|
||||
|
||||
$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;
|
||||
}
|
44
bin/zf.bat
Normal file
44
bin/zf.bat
Normal file
@ -0,0 +1,44 @@
|
||||
@ECHO off
|
||||
REM Zend Framework
|
||||
REM
|
||||
REM LICENSE
|
||||
REM
|
||||
REM This source file is subject to the new BSD license that is bundled
|
||||
REM with this package in the file LICENSE.txt.
|
||||
REM It is also available through the world-wide-web at this URL:
|
||||
REM http://framework.zend.com/license/new-bsd
|
||||
REM If you did not receive a copy of the license and are unable to
|
||||
REM obtain it through the world-wide-web, please send an email
|
||||
REM to license@zend.com so we can send you a copy immediately.
|
||||
REM
|
||||
REM Zend
|
||||
REM Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
REM http://framework.zend.com/license/new-bsd New BSD License
|
||||
|
||||
|
||||
REM Test to see if this was installed via pear
|
||||
SET ZTMPZTMPZTMPZ=@ph
|
||||
SET TMPZTMPZTMP=%ZTMPZTMPZTMPZ%p_bin@
|
||||
REM below @php_bin@
|
||||
FOR %%x IN ("@php_bin@") DO (if %%x=="%TMPZTMPZTMP%" GOTO :NON_PEAR_INSTALLED)
|
||||
|
||||
GOTO PEAR_INSTALLED
|
||||
|
||||
:NON_PEAR_INSTALLED
|
||||
REM Assume php.exe is executable, and that zf.php will reside in the
|
||||
REM same file as this one
|
||||
SET PHP_BIN=php.exe
|
||||
SET PHP_DIR=%~dp0
|
||||
GOTO RUN
|
||||
|
||||
:PEAR_INSTALLED
|
||||
REM Assume this was installed via PEAR and use replacements php_bin & php_dir
|
||||
SET PHP_BIN=@php_bin@
|
||||
SET PHP_DIR=@php_dir@
|
||||
GOTO RUN
|
||||
|
||||
:RUN
|
||||
SET ZF_SCRIPT=%PHP_DIR%\zf.php
|
||||
"%PHP_BIN%" -d safe_mode=Off -f "%ZF_SCRIPT%" -- %*
|
||||
|
||||
|
624
bin/zf.php
Normal file
624
bin/zf.php
Normal file
@ -0,0 +1,624 @@
|
||||
<?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_Tool
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
/**
|
||||
* ZF
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class ZF
|
||||
{
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
protected $_clientLoaded = false;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $_mode = 'runTool';
|
||||
|
||||
/**
|
||||
* @var array of messages
|
||||
*/
|
||||
protected $_messages = array();
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $_homeDirectory = null;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $_storageDirectory = null;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $_configFile = null;
|
||||
|
||||
/**
|
||||
* main()
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function main()
|
||||
{
|
||||
$zf = new self();
|
||||
$zf->bootstrap();
|
||||
$zf->run();
|
||||
}
|
||||
|
||||
/**
|
||||
* bootstrap()
|
||||
*
|
||||
* @return ZF
|
||||
*/
|
||||
public function bootstrap()
|
||||
{
|
||||
// detect settings
|
||||
$this->_mode = $this->_detectMode();
|
||||
$this->_homeDirectory = $this->_detectHomeDirectory();
|
||||
$this->_storageDirectory = $this->_detectStorageDirectory();
|
||||
$this->_configFile = $this->_detectConfigFile();
|
||||
|
||||
// setup
|
||||
$this->_setupPHPRuntime();
|
||||
$this->_setupToolRuntime();
|
||||
}
|
||||
|
||||
/**
|
||||
* run()
|
||||
*
|
||||
* @return ZF
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
switch ($this->_mode) {
|
||||
case 'runError':
|
||||
$this->_runError();
|
||||
$this->_runInfo();
|
||||
break;
|
||||
case 'runSetup':
|
||||
if ($this->_runSetup() === false) {
|
||||
$this->_runInfo();
|
||||
}
|
||||
break;
|
||||
case 'runInfo':
|
||||
$this->_runInfo();
|
||||
break;
|
||||
case 'runTool':
|
||||
default:
|
||||
$this->_runTool();
|
||||
break;
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* _detectMode()
|
||||
*
|
||||
* @return ZF
|
||||
*/
|
||||
protected function _detectMode()
|
||||
{
|
||||
$arguments = $_SERVER['argv'];
|
||||
|
||||
$mode = 'runTool';
|
||||
|
||||
if (!isset($arguments[0])) {
|
||||
return $mode;
|
||||
}
|
||||
|
||||
if ($arguments[0] == $_SERVER['PHP_SELF']) {
|
||||
$this->_executable = array_shift($arguments);
|
||||
}
|
||||
|
||||
if (!isset($arguments[0])) {
|
||||
return $mode;
|
||||
}
|
||||
|
||||
if ($arguments[0] == '--setup') {
|
||||
$mode = 'runSetup';
|
||||
} elseif ($arguments[0] == '--info') {
|
||||
$mode = 'runInfo';
|
||||
}
|
||||
|
||||
return $mode;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* _detectHomeDirectory() - detect the home directory in a variety of different places
|
||||
*
|
||||
* @param bool $mustExist Should the returned value already exist in the file system
|
||||
* @param bool $returnMessages Should it log messages for output later
|
||||
* @return string
|
||||
*/
|
||||
protected function _detectHomeDirectory($mustExist = true, $returnMessages = true)
|
||||
{
|
||||
$homeDirectory = null;
|
||||
|
||||
$homeDirectory = getenv('ZF_HOME'); // check env var ZF_HOME
|
||||
if ($homeDirectory) {
|
||||
$this->_logMessage('Home directory found in environment variable ZF_HOME with value ' . $homeDirectory, $returnMessages);
|
||||
if (!$mustExist || ($mustExist && file_exists($homeDirectory))) {
|
||||
return $homeDirectory;
|
||||
} else {
|
||||
$this->_logMessage('Home directory does not exist at ' . $homeDirectory, $returnMessages);
|
||||
}
|
||||
}
|
||||
|
||||
$homeDirectory = getenv('HOME'); // HOME environment variable
|
||||
|
||||
if ($homeDirectory) {
|
||||
$this->_logMessage('Home directory found in environment variable HOME with value ' . $homeDirectory, $returnMessages);
|
||||
if (!$mustExist || ($mustExist && file_exists($homeDirectory))) {
|
||||
return $homeDirectory;
|
||||
} else {
|
||||
$this->_logMessage('Home directory does not exist at ' . $homeDirectory, $returnMessages);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$homeDirectory = getenv('HOMEPATH');
|
||||
|
||||
if ($homeDirectory) {
|
||||
$this->_logMessage('Home directory found in environment variable HOMEPATH with value ' . $homeDirectory, $returnMessages);
|
||||
if (!$mustExist || ($mustExist && file_exists($homeDirectory))) {
|
||||
return $homeDirectory;
|
||||
} else {
|
||||
$this->_logMessage('Home directory does not exist at ' . $homeDirectory, $returnMessages);
|
||||
}
|
||||
}
|
||||
|
||||
$homeDirectory = getenv('USERPROFILE');
|
||||
|
||||
if ($homeDirectory) {
|
||||
$this->_logMessage('Home directory found in environment variable USERPROFILE with value ' . $homeDirectory, $returnMessages);
|
||||
if (!$mustExist || ($mustExist && file_exists($homeDirectory))) {
|
||||
return $homeDirectory;
|
||||
} else {
|
||||
$this->_logMessage('Home directory does not exist at ' . $homeDirectory, $returnMessages);
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* _detectStorageDirectory() - Detect where the storage directory is from a variaty of possiblities
|
||||
*
|
||||
* @param bool $mustExist Should the returned value already exist in the file system
|
||||
* @param bool $returnMessages Should it log messages for output later
|
||||
* @return string
|
||||
*/
|
||||
protected function _detectStorageDirectory($mustExist = true, $returnMessages = true)
|
||||
{
|
||||
$storageDirectory = false;
|
||||
|
||||
$storageDirectory = getenv('ZF_STORAGE_DIR');
|
||||
if ($storageDirectory) {
|
||||
$this->_logMessage('Storage directory path found in environment variable ZF_STORAGE_DIR with value ' . $storageDirectory, $returnMessages);
|
||||
if (!$mustExist || ($mustExist && file_exists($storageDirectory))) {
|
||||
return $storageDirectory;
|
||||
} else {
|
||||
$this->_logMessage('Storage directory does not exist at ' . $storageDirectory, $returnMessages);
|
||||
}
|
||||
}
|
||||
|
||||
$homeDirectory = ($this->_homeDirectory) ? $this->_homeDirectory : $this->_detectHomeDirectory(true, false);
|
||||
|
||||
if ($homeDirectory) {
|
||||
$storageDirectory = $homeDirectory . '/.zf/';
|
||||
$this->_logMessage('Storage directory assumed in home directory at location ' . $storageDirectory, $returnMessages);
|
||||
if (!$mustExist || ($mustExist && file_exists($storageDirectory))) {
|
||||
return $storageDirectory;
|
||||
} else {
|
||||
$this->_logMessage('Storage directory does not exist at ' . $storageDirectory, $returnMessages);
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* _detectConfigFile() - Detect config file location from a variety of possibilities
|
||||
*
|
||||
* @param bool $mustExist Should the returned value already exist in the file system
|
||||
* @param bool $returnMessages Should it log messages for output later
|
||||
* @return string
|
||||
*/
|
||||
protected function _detectConfigFile($mustExist = true, $returnMessages = true)
|
||||
{
|
||||
$configFile = null;
|
||||
|
||||
$configFile = getenv('ZF_CONFIG_FILE');
|
||||
if ($configFile) {
|
||||
$this->_logMessage('Config file found environment variable ZF_CONFIG_FILE at ' . $configFile, $returnMessages);
|
||||
if (!$mustExist || ($mustExist && file_exists($configFile))) {
|
||||
return $configFile;
|
||||
} else {
|
||||
$this->_logMessage('Config file does not exist at ' . $configFile, $returnMessages);
|
||||
}
|
||||
}
|
||||
|
||||
$homeDirectory = ($this->_homeDirectory) ? $this->_homeDirectory : $this->_detectHomeDirectory(true, false);
|
||||
if ($homeDirectory) {
|
||||
$configFile = $homeDirectory . '/.zf.ini';
|
||||
$this->_logMessage('Config file assumed in home directory at location ' . $configFile, $returnMessages);
|
||||
if (!$mustExist || ($mustExist && file_exists($configFile))) {
|
||||
return $configFile;
|
||||
} else {
|
||||
$this->_logMessage('Config file does not exist at ' . $configFile, $returnMessages);
|
||||
}
|
||||
}
|
||||
|
||||
$storageDirectory = ($this->_storageDirectory) ? $this->_storageDirectory : $this->_detectStorageDirectory(true, false);
|
||||
if ($storageDirectory) {
|
||||
$configFile = $storageDirectory . '/zf.ini';
|
||||
$this->_logMessage('Config file assumed in storage directory at location ' . $configFile, $returnMessages);
|
||||
if (!$mustExist || ($mustExist && file_exists($configFile))) {
|
||||
return $configFile;
|
||||
} else {
|
||||
$this->_logMessage('Config file does not exist at ' . $configFile, $returnMessages);
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* _setupPHPRuntime() - parse the config file if it exists for php ini values to set
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function _setupPHPRuntime()
|
||||
{
|
||||
// set php runtime settings
|
||||
ini_set('display_errors', true);
|
||||
|
||||
// support the changing of the current working directory, necessary for some providers
|
||||
$cwd = getenv('ZEND_TOOL_CURRENT_WORKING_DIRECTORY');
|
||||
if ($cwd != '' && realpath($cwd)) {
|
||||
chdir($cwd);
|
||||
}
|
||||
|
||||
if (!$this->_configFile) {
|
||||
return;
|
||||
}
|
||||
$zfINISettings = parse_ini_file($this->_configFile);
|
||||
$phpINISettings = ini_get_all();
|
||||
foreach ($zfINISettings as $zfINIKey => $zfINIValue) {
|
||||
if (substr($zfINIKey, 0, 4) === 'php.') {
|
||||
$phpINIKey = substr($zfINIKey, 4);
|
||||
if (array_key_exists($phpINIKey, $phpINISettings)) {
|
||||
ini_set($phpINIKey, $zfINIValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* _setupToolRuntime() - setup the tools include_path and load the proper framwork parts that
|
||||
* enable Zend_Tool to work.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function _setupToolRuntime()
|
||||
{
|
||||
|
||||
$includePathPrepend = getenv('ZEND_TOOL_INCLUDE_PATH_PREPEND');
|
||||
$includePathFull = getenv('ZEND_TOOL_INCLUDE_PATH');
|
||||
|
||||
// check if the user has not provided anything
|
||||
if (!($includePathPrepend || $includePathFull)) {
|
||||
if ($this->_tryClientLoad()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// if ZF is not in the include_path, but relative to this file, put it in the include_path
|
||||
if ($includePathPrepend || $includePathFull) {
|
||||
if (isset($includePathPrepend) && ($includePathPrepend !== false)) {
|
||||
set_include_path($includePathPrepend . PATH_SEPARATOR . get_include_path());
|
||||
} elseif (isset($includePathFull) && ($includePathFull !== false)) {
|
||||
set_include_path($includePathFull);
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->_tryClientLoad()) {
|
||||
return;
|
||||
}
|
||||
|
||||
$zfIncludePath['relativePath'] = dirname(__FILE__) . '/../library/';
|
||||
if (file_exists($zfIncludePath['relativePath'] . 'Zend/Tool/Framework/Client/Console.php')) {
|
||||
set_include_path(realpath($zfIncludePath['relativePath']) . PATH_SEPARATOR . get_include_path());
|
||||
}
|
||||
|
||||
if (!$this->_tryClientLoad()) {
|
||||
$this->_mode = 'runError';
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* _tryClientLoad() - Attempt to load the Zend_Tool_Framework_Client_Console to enable the tool to run.
|
||||
*
|
||||
* This method will return false if its not loaded to allow the consumer to alter the environment in such
|
||||
* a way that it can be called again to try loading the proper file/class.
|
||||
*
|
||||
* @return bool if the client is actuall loaded or not
|
||||
*/
|
||||
protected function _tryClientLoad()
|
||||
{
|
||||
$this->_clientLoaded = false;
|
||||
$fh = @fopen('Zend/Tool/Framework/Client/Console.php', 'r', true);
|
||||
if (!$fh) {
|
||||
return $this->_clientLoaded; // false
|
||||
} else {
|
||||
fclose($fh);
|
||||
unset($fh);
|
||||
include 'Zend/Tool/Framework/Client/Console.php';
|
||||
$this->_clientLoaded = class_exists('Zend_Tool_Framework_Client_Console');
|
||||
}
|
||||
|
||||
return $this->_clientLoaded;
|
||||
}
|
||||
|
||||
/**
|
||||
* _runError() - Output the error screen that tells the user that the tool was not setup
|
||||
* in a sane way
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function _runError()
|
||||
{
|
||||
|
||||
echo <<<EOS
|
||||
|
||||
***************************** ZF ERROR ********************************
|
||||
In order to run the zf command, you need to ensure that Zend Framework
|
||||
is inside your include_path. There are a variety of ways that you can
|
||||
ensure that this zf command line tool knows where the Zend Framework
|
||||
library is on your system, but not all of them can be described here.
|
||||
|
||||
The easiest way to get the zf command running is to give it the include
|
||||
path via an environment variable ZEND_TOOL_INCLUDE_PATH or
|
||||
ZEND_TOOL_INCLUDE_PATH_PREPEND with the proper include path to use,
|
||||
then run the command "zf --setup". This command is designed to create
|
||||
a storage location for your user, as well as create the zf.ini file
|
||||
that the zf command will consult in order to run properly on your
|
||||
system.
|
||||
|
||||
Example you would run:
|
||||
|
||||
$ ZEND_TOOL_INCLUDE_PATH=/path/to/library zf --setup
|
||||
|
||||
Your are encourged to read more in the link that follows.
|
||||
|
||||
EOS;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* _runInfo() - this command will produce information about the setup of this script and
|
||||
* Zend_Tool
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function _runInfo()
|
||||
{
|
||||
echo 'Zend_Tool & CLI Setup Information' . PHP_EOL
|
||||
. '(available via the command line "zf --info")'
|
||||
. PHP_EOL;
|
||||
|
||||
echo ' * ' . implode(PHP_EOL . ' * ', $this->_messages) . PHP_EOL;
|
||||
|
||||
echo PHP_EOL;
|
||||
|
||||
echo 'To change the setup of this tool, run: "zf --setup"';
|
||||
|
||||
echo PHP_EOL;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* _runSetup() - parse the request to see which setup command to run
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function _runSetup()
|
||||
{
|
||||
$setupCommand = (isset($_SERVER['argv'][2])) ? $_SERVER['argv'][2] : null;
|
||||
|
||||
switch ($setupCommand) {
|
||||
case 'storage-directory':
|
||||
$this->_runSetupStorageDirectory();
|
||||
break;
|
||||
case 'config-file':
|
||||
$this->_runSetupConfigFile();
|
||||
break;
|
||||
default:
|
||||
$this->_runSetupMoreInfo();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* _runSetupStorageDirectory() - if the storage directory does not exist, create it
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function _runSetupStorageDirectory()
|
||||
{
|
||||
$storageDirectory = $this->_detectStorageDirectory(false, false);
|
||||
|
||||
if (file_exists($storageDirectory)) {
|
||||
echo 'Directory already exists at ' . $storageDirectory . PHP_EOL
|
||||
. 'Cannot create storage directory.';
|
||||
return;
|
||||
}
|
||||
|
||||
mkdir($storageDirectory);
|
||||
|
||||
echo 'Storage directory created at ' . $storageDirectory . PHP_EOL;
|
||||
}
|
||||
|
||||
/**
|
||||
* _runSetupConfigFile()
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function _runSetupConfigFile()
|
||||
{
|
||||
$configFile = $this->_detectConfigFile(false, false);
|
||||
|
||||
if (file_exists($configFile)) {
|
||||
echo 'File already exists at ' . $configFile . PHP_EOL
|
||||
. 'Cannot write new config file.';
|
||||
return;
|
||||
}
|
||||
|
||||
$includePath = get_include_path();
|
||||
|
||||
$contents = 'php.include_path = "' . $includePath . '"';
|
||||
|
||||
file_put_contents($configFile, $contents);
|
||||
|
||||
$iniValues = ini_get_all();
|
||||
if ($iniValues['include_path']['global_value'] != $iniValues['include_path']['local_value']) {
|
||||
echo 'NOTE: the php include_path to be used with the tool has been written' . PHP_EOL
|
||||
. 'to the config file, using ZEND_TOOL_INCLUDE_PATH (or other include_path setters)' . PHP_EOL
|
||||
. 'is no longer necessary.' . PHP_EOL . PHP_EOL;
|
||||
}
|
||||
|
||||
echo 'Config file written to ' . $configFile . PHP_EOL;
|
||||
}
|
||||
|
||||
/**
|
||||
* _runSetupMoreInfo() - return more information about what can be setup, and what is setup
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function _runSetupMoreInfo()
|
||||
{
|
||||
$homeDirectory = $this->_detectHomeDirectory(false, false);
|
||||
$storageDirectory = $this->_detectStorageDirectory(false, false);
|
||||
$configFile = $this->_detectConfigFile(false, false);
|
||||
|
||||
echo <<<EOS
|
||||
|
||||
ZF Command Line Tool - Setup
|
||||
----------------------------
|
||||
|
||||
Current Paths (Existing or not):
|
||||
Home Directory: {$homeDirectory}
|
||||
Storage Directory: {$storageDirectory}
|
||||
Config File: {$configFile}
|
||||
|
||||
Important Environment Variables:
|
||||
ZF_HOME
|
||||
- the directory this tool will look for a home directory
|
||||
- directory must exist
|
||||
ZF_STORAGE_DIR
|
||||
- where this tool will look for a storage directory
|
||||
- directory must exist
|
||||
ZF_CONFIG_FILE
|
||||
- where this tool will look for a configuration file
|
||||
ZF_TOOL_INCLUDE_PATH
|
||||
- set the include_path for this tool to use this value
|
||||
ZF_TOOL_INCLUDE_PATH_PREPEND
|
||||
- prepend the current php.ini include_path with this value
|
||||
|
||||
Search Order:
|
||||
Home Directory:
|
||||
- ZF_HOME, then HOME (*nix), then HOMEPATH (windows)
|
||||
Storage Directory:
|
||||
- ZF_STORAGE_DIR, then {home}/.zf/
|
||||
Config File:
|
||||
- ZF_CONFIG_FILE, then {home}/.zf.ini, then {home}/zf.ini,
|
||||
then {storage}/zf.ini
|
||||
|
||||
Commands:
|
||||
zf --setup storage-directory
|
||||
- setup the storage directory, directory will be created
|
||||
zf --setup config-file
|
||||
- create the config file with some default values
|
||||
|
||||
|
||||
EOS;
|
||||
}
|
||||
|
||||
/**
|
||||
* _runTool() - This is where the magic happens, dispatch Zend_Tool
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function _runTool()
|
||||
{
|
||||
|
||||
$configOptions = array();
|
||||
if (isset($this->_configFile) && $this->_configFile) {
|
||||
$configOptions['configOptions']['configFilepath'] = $this->_configFile;
|
||||
}
|
||||
if (isset($this->_storageDirectory) && $this->_storageDirectory) {
|
||||
$configOptions['storageOptions']['directory'] = $this->_storageDirectory;
|
||||
}
|
||||
|
||||
// ensure that zf.php loads the Zend_Tool_Project features
|
||||
$configOptions['classesToLoad'] = 'Zend_Tool_Project_Provider_Manifest';
|
||||
|
||||
$console = new Zend_Tool_Framework_Client_Console($configOptions);
|
||||
$console->dispatch();
|
||||
}
|
||||
|
||||
/**
|
||||
* _logMessage() - Internal method used to log setup and information messages.
|
||||
*
|
||||
* @param string $message
|
||||
* @param bool $storeMessage
|
||||
* @return void
|
||||
*/
|
||||
protected function _logMessage($message, $storeMessage = true)
|
||||
{
|
||||
if (!$storeMessage) {
|
||||
return;
|
||||
}
|
||||
|
||||
$this->_messages[] = $message;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (!getenv('ZF_NO_MAIN')) {
|
||||
ZF::main();
|
||||
}
|
45
bin/zf.sh
Normal file
45
bin/zf.sh
Normal file
@ -0,0 +1,45 @@
|
||||
#!/bin/sh
|
||||
|
||||
#############################################################################
|
||||
# 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.
|
||||
#
|
||||
# Zend
|
||||
# Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
# http://framework.zend.com/license/new-bsd New BSD License
|
||||
#############################################################################
|
||||
|
||||
|
||||
# find php: pear first, command -v second, straight up php lastly
|
||||
if test "@php_bin@" != '@'php_bin'@'; then
|
||||
PHP_BIN="@php_bin@"
|
||||
elif command -v php 1>/dev/null 2>/dev/null; then
|
||||
PHP_BIN=`command -v php`
|
||||
else
|
||||
PHP_BIN=php
|
||||
fi
|
||||
|
||||
# find zf.php: pear first, same directory 2nd,
|
||||
if test "@php_dir@" != '@'php_dir'@'; then
|
||||
PHP_DIR="@php_dir@"
|
||||
else
|
||||
SELF_LINK="$0"
|
||||
SELF_LINK_TMP="$(readlink "$SELF_LINK")"
|
||||
while test -n "$SELF_LINK_TMP"; do
|
||||
SELF_LINK="$SELF_LINK_TMP"
|
||||
SELF_LINK_TMP="$(readlink "$SELF_LINK")"
|
||||
done
|
||||
PHP_DIR="$(dirname "$SELF_LINK")"
|
||||
fi
|
||||
|
||||
"$PHP_BIN" -d safe_mode=Off -f "$PHP_DIR/zf.php" -- "$@"
|
||||
|
@ -4226,7 +4226,7 @@ class MInsee
|
||||
$where.=" AND e.ROLE IN('".implode("','",$tabCodRol)."') ";
|
||||
}
|
||||
}
|
||||
else {
|
||||
elseif ( !empty($rubrique) ) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -4258,7 +4258,7 @@ class MInsee
|
||||
$where.= implode(' OR ',$tabTmp);
|
||||
$where.= ')';
|
||||
}
|
||||
else {
|
||||
elseif ( !empty($rubrique) ) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -3,12 +3,31 @@ class MRnvp
|
||||
{
|
||||
protected $iDb;
|
||||
protected $iInsee;
|
||||
|
||||
|
||||
public $tabDevises=array();
|
||||
public $nomTronque=0;
|
||||
|
||||
function __construct()
|
||||
{
|
||||
|
||||
protected $tabAdrCQ=array(
|
||||
10=>'Adresse correcte',
|
||||
20=>'Adresse correcte (Voie non reconue dans un CEDEX ou BP)',
|
||||
21=>'Adresse correcte mais numéro de facade hors borne (petite ville)',
|
||||
22=>'Adresse correcte mais numéro de facade absent (petite ville)',
|
||||
23=>'Adresse correcte mais numéro de facade hors borne (grande ville)',
|
||||
24=>'Adresse correcte mais numéro de facade absent (grande ville)',
|
||||
30=>'Voie non reconnue (petite ville)',
|
||||
31=>'Voie non reconnue (petite ville, quartier reconnu)',
|
||||
40=>'Voie absente (petite ville, quartier reconnu)',
|
||||
41=>'Voie absente (petite ville)',
|
||||
50=>'Voie non reconnue (grande ville)',
|
||||
51=>'Voie non reconnue (grande ville, quartier reconnu)',
|
||||
60=>'Voie absente (grande ville, quartier reconnu)',
|
||||
61=>'Voie absente (grande ville)',
|
||||
70=>'Voie présente mais Cp/Ville non corrigeable',
|
||||
80=>'Voie absente et Cp/Ville non corrigeable',
|
||||
90=>'Adresse à l\'étranger',
|
||||
);
|
||||
|
||||
function __construct() {
|
||||
$this->iDb = new WDB();
|
||||
$this->iInsee = new MInsee($this->iDb);
|
||||
}
|
||||
@ -23,10 +42,10 @@ class MRnvp
|
||||
$tabDevises=array();
|
||||
foreach($rep as $k=>$dev)
|
||||
$tabDevises[$dev['devInpi']*1]=$dev['devIso'];
|
||||
|
||||
|
||||
return $tabDevises;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Récupération du code ISO de la devise numérique de l'Inpi
|
||||
* @param integer $numDeviseInpi
|
||||
@ -39,7 +58,7 @@ class MRnvp
|
||||
else
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @todo Corriger les adresses présentes dans CEDEXA (toutes les lignes)
|
||||
* @todo Ligne 3, acheter HEXALIGNE3
|
||||
@ -83,19 +102,26 @@ class MRnvp
|
||||
|
||||
// Ligne 3, acheter HEXALIGNE3
|
||||
$L3=$adrL3;
|
||||
|
||||
|
||||
// Ligne 5 et 7 par défaut
|
||||
$L7=$adrL7;
|
||||
$L5=$adrL5;
|
||||
|
||||
|
||||
// Ligne 6 : CP + Localité
|
||||
$idAdr56=false;
|
||||
$tabAdr56k=$tabAdr56L=array();
|
||||
$cp=substr(trim($adrL6),0,5);
|
||||
$cp2=substr($cp,0,2);
|
||||
$ville=trim(strtr(substr($adrL6,5),array(' SAINT '=>' ST ',' SAINTE '=>' STE ')));
|
||||
if ($cp*1>0) {
|
||||
$cp2=substr($cp,0,2);
|
||||
$ville=trim(strtr(substr($adrL6,5),array(' SAINT '=>' ST ',' SAINTE '=>' STE ')));
|
||||
} else {
|
||||
$cp=$cp2='';
|
||||
$ville=trim(strtr($adrL6,array(' SAINT '=>' ST ',' SAINTE '=>' STE ')));
|
||||
}
|
||||
|
||||
$ville=preg_replace('/ CEDEX\s?.*$/ui','',$ville);
|
||||
$tabRetI=array(
|
||||
'operateurRnvp'=>'SED',
|
||||
'in_cp'=>$cp,
|
||||
'in_dep'=>$cp2,
|
||||
'in_ville'=>$ville,
|
||||
@ -107,7 +133,7 @@ class MRnvp
|
||||
'in_L6'=>$adrL6,
|
||||
'in_L7'=>$adrL7);
|
||||
//$dureeM=round(microtime(1)-$tDeb,3);
|
||||
|
||||
|
||||
$tD=microtime(1);
|
||||
$ret=$this->iDb->select('villes.hexaviaVilles',
|
||||
"idAdr56, codeInseeCom, libCom$norme, codeInseeGlobal, indPluridis, libLigne5n$norme, indRoudis, codePostal, libLigne6n$norme, codeInseePre, codeMaj$norme, dateMaj$norme, MATCH (codePostal, libCom38) AGAINST ('$cp $ville' IN NATURAL LANGUAGE MODE) AS score",
|
||||
@ -117,8 +143,7 @@ class MRnvp
|
||||
$tabRetE=array(
|
||||
'dureeV'=> round(microtime(1)-$tD,3),
|
||||
'errRNVPcode'=>'V0',
|
||||
'errRNVPlib'=>'Aucune correspondance CP VILLE'
|
||||
);
|
||||
'errRNVPlib'=> "Aucune correspondance CP VILLE (cp=$cp, ville=$ville)");
|
||||
$erreur=true;
|
||||
} else {
|
||||
foreach($ret as $i=>$iRet) {
|
||||
@ -194,7 +219,7 @@ class MRnvp
|
||||
}
|
||||
}
|
||||
if ($erreur) return array_merge($tabRetI,$tabRetE);
|
||||
|
||||
|
||||
// Ligne 4 : Découpage N° Répétition TypeVoie et LibelléVoie
|
||||
$tD=microtime(1);
|
||||
$matriculeHexavia=false;
|
||||
@ -258,9 +283,9 @@ class MRnvp
|
||||
if ($iRet['score']>17 && isset($ret[$i+1]) && $iRet['score']>$ret[$i+1]['score']) break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$dureeR=round(microtime(1)-$tD,3);
|
||||
|
||||
|
||||
if (!$matriculeHexavia) {
|
||||
if ($debug) print_r($ret);
|
||||
if ($debug) echo ("Plusieurs correspondances Voies pour $adrL4 $adrL6 dans cette commune ('$strAdr56') !".EOL);
|
||||
@ -268,13 +293,13 @@ class MRnvp
|
||||
$tabRetE=array( 'dureeRnvp'=>round(microtime(1)-$tDeb,3),
|
||||
'errRNVPcode'=>'R2',
|
||||
'errRNVPlib'=>"Plusieurs correspondances Voies pour $adrL4 $adrL6 dans cette commune ('$strAdr56')");
|
||||
|
||||
|
||||
return array_merge($tabRetI,$tabRetV,$tabRetE);
|
||||
}
|
||||
}
|
||||
|
||||
if (!$matriculeHexavia && @strlen($L4)==0) $L4=$adrL4;
|
||||
|
||||
|
||||
$tD=microtime(1);
|
||||
$tabLen=$tabMaxLen=array();
|
||||
$tabLen[1]=strlen($L1);
|
||||
@ -317,7 +342,7 @@ class MRnvp
|
||||
}
|
||||
}
|
||||
$dureeN=round(microtime(1)-$tD,3);
|
||||
|
||||
|
||||
$tabRetR = array(
|
||||
'L1'=>$L1,
|
||||
'L2'=>$L2,
|
||||
@ -338,12 +363,12 @@ class MRnvp
|
||||
'dureeRnvp'=>round(microtime(1)-$tDeb,3),
|
||||
'dureeM'=>$dureeM*1.0,
|
||||
);
|
||||
|
||||
|
||||
$tabRet = array_merge($tabRetI,$tabRetV,$tabRetR,$tabRetE);
|
||||
|
||||
|
||||
return $tabRet;
|
||||
}
|
||||
|
||||
|
||||
/** Retourne le tableau des abbréviations existantes par type d'abréviation
|
||||
*/
|
||||
function getAbreviations($typeAbrev)
|
||||
@ -377,12 +402,12 @@ class MRnvp
|
||||
//print_r($tabRet);die();
|
||||
return $tabRet;
|
||||
}
|
||||
|
||||
|
||||
/** Normalise une raison sociale ou un nom
|
||||
**/
|
||||
function normaliseRS($nomLong, $taille=38, $debug=false)
|
||||
{
|
||||
$nomCourt=preg_replace('/[^A-Z0-9%\'\"\-&\*\/\s]/','',trim(strtoupper($nomLong)));
|
||||
$nomCourt=preg_replace('/[^A-Z0-9%@&\'\(\)\"\-\*\/\s\+]/','',trim(strtoupper($nomLong)));
|
||||
$tabMots=split("[^[:alpha:]]+", $nomCourt);
|
||||
$passage=0;
|
||||
$this->nomTronque=0;
|
||||
@ -399,7 +424,7 @@ class MRnvp
|
||||
}
|
||||
if ($debug) echo "1-Voies=$nomCourt".EOL;
|
||||
if (strlen($nomCourt)<=$taille) break;
|
||||
|
||||
|
||||
//print_r($tabMots);
|
||||
// 2. Remplacement des Titres par leurs abréviation
|
||||
$tabTmp=$this->getAbreviations('T');
|
||||
@ -412,14 +437,14 @@ class MRnvp
|
||||
}
|
||||
if ($debug) echo "2a-Titres=$nomCourt".EOL;
|
||||
if (strlen($nomCourt)<=$taille) break;
|
||||
|
||||
|
||||
// 2. Remplacement des Formes Juridiques
|
||||
$tabTmp=$this->getAbreviations('J');
|
||||
foreach ($tabTmp as $lib=>$abr)
|
||||
$nomCourt=trim(str_replace(" $lib ", ' '.$abr.' ', " $nomCourt "));
|
||||
if ($debug) echo "2b-FJ=$nomCourt".EOL;
|
||||
if (strlen($nomCourt)<=$taille) break;
|
||||
|
||||
|
||||
// 4. Suppression des articles
|
||||
$tabTmp=$this->getAbreviations('A');
|
||||
foreach ($tabTmp as $lib=>$abr) {
|
||||
@ -451,10 +476,10 @@ class MRnvp
|
||||
}
|
||||
if ($debug) echo "5-Autres Noms=$nomCourt".EOL;
|
||||
if (strlen($nomCourt)<=$taille) break;
|
||||
|
||||
|
||||
$nomCourt=substr($nomCourt,0,$taille);
|
||||
$this->nomTronque=1;
|
||||
|
||||
|
||||
//die($nomCourt);
|
||||
/** @todo A finir
|
||||
Tronquer ou abréger dans cette ordre
|
||||
@ -465,21 +490,21 @@ class MRnvp
|
||||
- tronquer à 4 caractères les types de voie non normalisés
|
||||
- tronquer les extensions de voie
|
||||
- réduire le nom de la voie en supprimant les mots de la gauche vers la droite
|
||||
|
||||
|
||||
Gérer les pluriels pour les voies, nom, titres, et formes juridiques
|
||||
**/
|
||||
$passage++;
|
||||
}
|
||||
return $nomCourt;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Code Insee de la commune libCom32 Libellé de la commune (Ancienne norme 32) libCom38 Libellé
|
||||
function getLibCommune($codeInsee, $norme=38) {
|
||||
if ($norme<>32 && $norme<>38) {
|
||||
return 'La norme doit être 32 ou 38 caractères (38 par défaut)'.EOL;
|
||||
}
|
||||
|
||||
|
||||
$ret=$this->iDb->select('villes.hexaviaVilles',
|
||||
"libCom32 , libCom38",
|
||||
"codeInseeCom='$codeInsee' LIMIT 0,1",false, MYSQL_ASSOC);
|
||||
@ -496,6 +521,16 @@ class MRnvp
|
||||
else return $ret[0]['libCom38'];
|
||||
}
|
||||
|
||||
function getCPCommune($codeInsee)
|
||||
{
|
||||
$ret=$this->iDb->select('villes.hexaviaVilles',
|
||||
"codePostal",
|
||||
"codeInseeCom='$codeInsee' GROUP BY codePostal",false, MYSQL_ASSOC);
|
||||
$nbRet=count($ret);
|
||||
if ($nbRet==1) return $ret[0]['codePostal'];
|
||||
return false;
|
||||
}
|
||||
|
||||
function getCodCommune($libelleCommune, $depOuCp='', $debug=false)
|
||||
{
|
||||
$norme=38;
|
||||
@ -529,10 +564,32 @@ class MRnvp
|
||||
}
|
||||
return $codeCommune;
|
||||
}
|
||||
|
||||
function normaliseAdresse76310($L1,$L2,$L3,$L4,$L5,$L6,$L7='') {
|
||||
//ini_set('soap.wsdl_cache_enabled', 0);
|
||||
$client = new SoapClient('http://www.rnvp-en-ligne.com/service.asmx?wsdl');
|
||||
|
||||
function normaliseAdresse76310($L1,$L2,$L3,$L4,$L5,$L6,$L7='')
|
||||
{
|
||||
$tDeb=microtime(1);
|
||||
$tabRetR=$tabRetE=array();
|
||||
|
||||
$cp=substr(trim($L6),0,5);
|
||||
$cp2=substr($cp,0,2);
|
||||
$ville=trim(strtr(substr($L6,5),array(' SAINT '=>' ST ',' SAINTE '=>' STE ')));
|
||||
$ville=preg_replace('/ CEDEX\s?.*$/ui','',$ville);
|
||||
$tabRetI=array( 'operateurRnvp'=>'76310WEB',
|
||||
'in_cp'=>$cp,
|
||||
'in_dep'=>$cp2,
|
||||
'in_ville'=>$ville,
|
||||
'in_L1'=>trim($L1),
|
||||
'in_L2'=>trim($L2),
|
||||
'in_L3'=>trim($L3),
|
||||
'in_L4'=>trim($L4),
|
||||
'in_L5'=>trim($L5),
|
||||
'in_L6'=>trim($L6),
|
||||
'in_L7'=>trim($L7));
|
||||
|
||||
//$client = new SoapClient('http://www.rnvp-en-ligne.com/service.asmx?wsdl');
|
||||
$client = new SoapClient('http://www.rnvp-en-ligne.com/service_v5.asmx?wsdl');
|
||||
$nbEssais=1;
|
||||
|
||||
$array = array (
|
||||
'pi_session' => '-1',
|
||||
'pi_user' => 'SDPROD',
|
||||
@ -550,21 +607,109 @@ class MRnvp
|
||||
'pio_cpville' => utf8_encode($L6), // Ligne 6
|
||||
'pio_pays' => utf8_encode($L7), // Ligne 7
|
||||
/* 'po_tnp' => '',
|
||||
'po_sex' => '',
|
||||
'po_civlong' => '',
|
||||
'po_cp' => '',
|
||||
'po_ville' => '',
|
||||
'po_insee' => '',
|
||||
'po_cqtnp' => '',
|
||||
'po_cqadrs' => '',
|
||||
'po_risquerestru' => '',
|
||||
'po_poidsmodif' => '',
|
||||
'po_rejet' => '',
|
||||
'po_etranger' => ''*/
|
||||
);
|
||||
$result = $client->Elfyweb_RNVP_Standard($array);
|
||||
return ($result);
|
||||
'po_sex' => '',
|
||||
'po_civlong' => '',
|
||||
'po_cp' => '',
|
||||
'po_ville' => '',
|
||||
'po_insee' => '',
|
||||
'po_cqtnp' => '',
|
||||
'po_cqadrs' => '',
|
||||
'po_risquerestru' => '',
|
||||
'po_poidsmodif' => '',
|
||||
'po_rejet' => '',
|
||||
'po_etranger' => ''*/
|
||||
);
|
||||
while(1) {
|
||||
try {
|
||||
//$result = $client->Elfyweb_RNVP_Standard($array);
|
||||
$result = $client->Elfyweb_RNVP_Expert_V50($array);
|
||||
//print_r($result);
|
||||
$tabRetR=array( 'L1'=>$L1,
|
||||
'L2'=>$L2,
|
||||
'L3'=>strtoupper(utf8_decode($result->pio_cadrs)),
|
||||
'L4'=>strtoupper(utf8_decode($result->pio_adresse)),
|
||||
'L5'=>strtoupper(utf8_decode($result->pio_lieudit)),
|
||||
'L6'=>strtoupper(utf8_decode($result->pio_cpville)),
|
||||
/* [po_risquerestru] => 0
|
||||
[po_poidsmodif] => 0
|
||||
[po_rejet] =>
|
||||
[po_etranger] =>*/
|
||||
'Cp'=>$result->po_cp,
|
||||
'Ville'=>$result->po_ville,
|
||||
'Insee'=>$result->po_insee,
|
||||
/*'CQadrs'=>$result->po_cqadrs,
|
||||
'CQadrsLib'=>$this->tabAdrCQ[$result->po_cqadrs],
|
||||
'CQAdrRnvp'=>$this->getLibQualiteAdresse76310($result->po_cqadrs, $result->rejet),*/
|
||||
'dureeRnvp'=>round(microtime(1)-$tDeb,3),
|
||||
);
|
||||
if (@$result->pio_pays<>'FRA') $tabRet['L7']=$result->pio_pays;
|
||||
break;
|
||||
} catch (SoapFault $fault) {
|
||||
$nbEssais++;
|
||||
if ($nbEssai<5) continue;
|
||||
$tabRetE=array( 'dureeRnvp'=>round(microtime(1)-$tDeb,3),
|
||||
'errRNVPcode'=>'S0',
|
||||
'errRNVPlib'=>"Erreur SOAP : ".print_r($fault,1));
|
||||
}
|
||||
}
|
||||
$tabRet=array_merge($tabRetI,$tabRetR,$tabRetE);
|
||||
return $tabRet;
|
||||
}
|
||||
|
||||
function getLibQualiteAdresse76310($cqadrs, $correctionDouteuse)
|
||||
{
|
||||
switch ($cqadrs*1) {
|
||||
case 10: // Adresse correcte
|
||||
case 20: // Adresse correcte (Voie non reconue dans un CEDEX ou BP)
|
||||
case 21: // Adresse correcte mais numéro de facade hors borne (petite ville)
|
||||
case 22: // Adresse correcte mais numéro de facade absent (petite ville)
|
||||
case 23: // Adresse correcte mais numéro de facade hors borne (grande ville)
|
||||
case 24: // Adresse correcte mais numéro de facade absent (grande ville)
|
||||
$cqRnvpSed=1;
|
||||
break;
|
||||
case 31: // Voie non reconnue (petite ville, quartier reconnu)
|
||||
case 51: // Voie non reconnue (grande ville, quartier reconnu)
|
||||
$cqRnvpSed=2;
|
||||
break;
|
||||
case 30: // Voie non reconnue (petite ville)
|
||||
case 50: // Voie non reconnue (grande ville)
|
||||
$cqRnvpSed=3;
|
||||
break;
|
||||
case 40: // Voie absente (petite ville, quartier reconnu)
|
||||
case 41: // Voie absente (petite ville)
|
||||
case 60: // Voie absente (grande ville, quartier reconnu)
|
||||
case 61: // Voie absente (grande ville)
|
||||
$cqRnvpSed=4;
|
||||
break;
|
||||
case 70: // Voie présente mais Cp/Ville non corrigeable
|
||||
case 80: // Voie absente et Cp/Ville non corrigeable
|
||||
$cqRnvpSed=5;
|
||||
break;
|
||||
default:
|
||||
$cqRnvpSed=0;
|
||||
break;
|
||||
}
|
||||
|
||||
if ($correctionDouteuse=='D') $cqRnvpSed=0;
|
||||
return $cqRnvpSed;
|
||||
}
|
||||
|
||||
function getAdresseRnvpSource($source, $source_id, $num=0)
|
||||
{
|
||||
$ret=$this->iDb->select(
|
||||
'villes.rnvpSources',
|
||||
'id, source, source_id, num, L1rnvp, L2rnvp, L3rnvp, L4rnvp, L5rnvp, L6rnvp, L7rnvp, Pays, dateInsert,
|
||||
operateurRnvp, dateEnvoiRnvp, dateRetourRnvp, codeRetour, NumVoie, BisTer, TypeVoieCourt, TypeVoieLong, LibVoie,
|
||||
Cp, Ville, Insee, CQadrs, CorrectionImportante, CorrectionDouteuse, HexaCle, CQL3, InseeGlobal, OldInsee,
|
||||
IsInseeReconstitue, NumDept, IdHexavia, IdHexaposte, Iris_Rivoli, Iris_Ilot99, Iris_CodeIris, Iris_Canton,
|
||||
Iris_Zus, Iris_Zfu, CqIris, dateUpdate',
|
||||
"source=$source AND source_id=$source_id AND num=$num LIMIT 0,1",false, MYSQL_ASSOC);
|
||||
$tabRet=$ret[0];
|
||||
$tabRet['CQadrsLib']=$this->tabAdrCQ[$tabRet['CQadrs']];
|
||||
|
||||
$tabRet['CQAdrRnvp']=$this->getLibQualiteAdresse76310($tabRet['CQadrs'], $tabRet['CorrectionDouteuse']);
|
||||
|
||||
return $tabRet;
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
@ -17,7 +17,7 @@ class MTva
|
||||
$this->vatDefined = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if ( $db === null ) {
|
||||
$this->iDb = new WDB();
|
||||
} else {
|
||||
@ -39,7 +39,7 @@ class MTva
|
||||
return false;
|
||||
}
|
||||
|
||||
$info = $this->iDb->select('sdv1.siren_tva', "cle, DATE_FORMAT(dateMod,'%Y%m%d') as DateMAJ", "siren=$siren", false, MYSQL_ASSOC);
|
||||
$info = $this->iDb->select('sdv1.siren_tva', "LPAD(cle,2,0) AS cle, DATE_FORMAT(dateMod,'%Y%m%d') as DateMAJ", "siren=$siren", false, MYSQL_ASSOC);
|
||||
$tab=$info[0];
|
||||
if (count($tab)>0) {
|
||||
//sendMail('production@scores-decisions.com', 'ylenaour@scores-decisions.com', "classMTva sur $siren en cache", print_r($tab, true));
|
||||
|
@ -1,15 +0,0 @@
|
||||
<?php
|
||||
// Generated by ZF's ./bin/classmap_generator.php
|
||||
return array(
|
||||
'Scores_Auth_Adapter_Db' => dirname(__FILE__) . '//Auth/Adapter/Db.php',
|
||||
'Scores_Auth_Adapter_Ws' => dirname(__FILE__) . '//Auth/Adapter/Ws.php',
|
||||
'Scores_Locale_String' => dirname(__FILE__) . '//Locale/String.php',
|
||||
'Scores_Mail_Method' => dirname(__FILE__) . '//Mail/Method.php',
|
||||
'Scores_Validate_IpInNetwork' => dirname(__FILE__) . '//Validate/IpInNetwork.php',
|
||||
'Scores_Wkhtml_Pdf' => dirname(__FILE__) . '//Wkhtml/Pdf.php',
|
||||
'Scores_Ws_Doc' => dirname(__FILE__) . '//Ws/Doc.php',
|
||||
'Scores_Ws_Exception' => dirname(__FILE__) . '//Ws/Exception.php',
|
||||
'Scores_Ws_Form_GetIdentite' => dirname(__FILE__) . '//Ws/Form/GetIdentite.php',
|
||||
'Scores_Ws_Server' => dirname(__FILE__) . '//Ws/Server.php',
|
||||
'Scores_Ws_Trigger' => dirname(__FILE__) . '//Ws/Trigger.php',
|
||||
);
|
@ -1,14 +0,0 @@
|
||||
<?php
|
||||
// Generated by ZF's ./bin/classmap_generator.php
|
||||
return array(
|
||||
'SdMetier_Graydon_Service' => dirname(__FILE__) . '//Graydon/Service.php',
|
||||
'SdMetier_Infogreffe_DocAC' => dirname(__FILE__) . '//Infogreffe/DocAC.php',
|
||||
'SdMetier_Infogreffe_DocBI' => dirname(__FILE__) . '//Infogreffe/DocBI.php',
|
||||
'SdMetier_Infogreffe_DocST' => dirname(__FILE__) . '//Infogreffe/DocST.php',
|
||||
'SdMetier_Infogreffe_Service' => dirname(__FILE__) . '//Infogreffe/Service.php',
|
||||
'SdMetier_Intersud_Service' => dirname(__FILE__) . '//Intersud/Service.php',
|
||||
'SdMetier_Rnvp_Detail' => dirname(__FILE__) . '//Rnvp/Detail.php',
|
||||
'SdMetier_Search_Engine' => dirname(__FILE__) . '//Search/Engine.php',
|
||||
'SdMetier_Sfr_Compile' => dirname(__FILE__) . '//Sfr/Compile.php',
|
||||
'SdMetier_Sfr_Scoring' => dirname(__FILE__) . '//Sfr/Scoring.php',
|
||||
);
|
2513
library/autoload_classmap.php
Normal file
2513
library/autoload_classmap.php
Normal file
File diff suppressed because it is too large
Load Diff
@ -13,8 +13,26 @@ 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/autoload_classmap.php',
|
||||
),
|
||||
'Zend_Loader_StandardAutoloader' => array(
|
||||
'prefixes' => array(
|
||||
'Zend' => __DIR__ . '/../library/Zend',
|
||||
'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(
|
||||
|
33
scripts/build/classmap.php
Normal file
33
scripts/build/classmap.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?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 . '/../library'),
|
||||
get_include_path(),
|
||||
)));
|
||||
|
||||
$dir = array(
|
||||
APPLICATION_PATH,
|
||||
APPLICATION_PATH."/../library/Zend",
|
||||
APPLICATION_PATH."/../library/Scores",
|
||||
APPLICATION_PATH."/../library/SdMetier",
|
||||
);
|
||||
|
||||
$fileClassmap = APPLICATION_PATH."/../library/autoload_classmap.php";
|
||||
|
||||
$i = 0;
|
||||
foreach($dir as $d) {
|
||||
$options = " -a";
|
||||
if ($i==0) {
|
||||
$options = " -w";
|
||||
}
|
||||
passthru("php ".APPLICATION_PATH."/../bin/classmap_generator.php -l ".$d.$options." -o ".$fileClassmap);
|
||||
$i++;
|
||||
}
|
@ -24,8 +24,26 @@ copy($configDir.'/'.$hostname.'/application.ini', $appconfigDir.'/application.in
|
||||
copy($configDir.'/'.$hostname.'/mysql.php', $appconfigDir.'/mysql.php');
|
||||
copy($configDir.'/'.$hostname.'/stockage.php', $appconfigDir.'/stockage.php');
|
||||
|
||||
/** 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/autoload_classmap.php',
|
||||
),
|
||||
'Zend_Loader_StandardAutoloader' => array(
|
||||
'prefixes' => array(
|
||||
'Zend' => __DIR__ . '/../../library/Zend',
|
||||
'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(
|
||||
|
@ -18,8 +18,26 @@ if (APPLICATION_ENV != 'production'){
|
||||
}
|
||||
require_once '../config/config.php';
|
||||
|
||||
/** 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/autoload_classmap.php',
|
||||
),
|
||||
'Zend_Loader_StandardAutoloader' => array(
|
||||
'prefixes' => array(
|
||||
'Zend' => __DIR__ . '/../../library/Zend',
|
||||
'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(
|
||||
|
@ -14,8 +14,26 @@ 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/autoload_classmap.php',
|
||||
),
|
||||
'Zend_Loader_StandardAutoloader' => array(
|
||||
'prefixes' => array(
|
||||
'Zend' => __DIR__ . '/../library/Zend',
|
||||
'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(
|
||||
|
@ -15,8 +15,26 @@ 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/autoload_classmap.php',
|
||||
),
|
||||
'Zend_Loader_StandardAutoloader' => array(
|
||||
'prefixes' => array(
|
||||
'Zend' => __DIR__ . '/../../library/Zend',
|
||||
'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(
|
||||
|
Loading…
Reference in New Issue
Block a user