1
0
mirror of https://github.com/hauke68/Magallanes.git synced 2025-08-26 13:20:17 +02:00
Magallanes/bin/mage
Mike Tralala 736fe7c4d8 the used timezone should be editable
if the timezone is set in the php cli ini file, mage should use that one instead of the default UTC
2015-03-16 13:33:30 +01:00

39 lines
988 B
PHP
Executable File

#!/usr/bin/env php
<?php
/*
* This file is part of the Magallanes package.
*
* (c) Andrés Montañez <andres@andresmontanez.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
if(empty(ini_get('date.timezone'))){
date_default_timezone_set('UTC');
}
$baseDir = dirname(dirname(__FILE__));
define('MAGALLANES_VERSION', '1.0.5');
define('MAGALLANES_DIRECTORY', $baseDir);
if (file_exists(__DIR__ . '/../vendor/autoload.php')) {
require_once __DIR__ . '/../vendor/autoload.php';
} else if (file_exists(__DIR__ . '/../../../autoload.php')) {
require_once __DIR__ . '/../../../autoload.php';
} else {
require_once $baseDir . '/Mage/Autoload.php';
$loader = new \Mage\Autoload();
spl_autoload_register(array($loader, 'autoLoad'));
}
// Clean arguments
array_shift($argv);
// Run Magallanes
$console = new Mage\Console;
$exitCode = $console->run($argv);
exit((integer) $exitCode);