Files
Magallanes/bin/mage
T

39 lines
992 B
PHP
Raw Normal View History

#!/usr/bin/env php
<?php
2013-11-05 14:12:09 -02:00
/*
* 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.
*/
2015-04-16 09:53:44 +02:00
$timezone = ini_get('date.timezone');
if (empty($timezone)) {
2015-03-16 13:33:30 +01:00
date_default_timezone_set('UTC');
}
2011-11-22 09:16:06 -02:00
$baseDir = dirname(dirname(__FILE__));
2011-11-22 09:16:06 -02:00
2017-01-05 23:58:33 -03:00
define('MAGALLANES_VERSION', '1.0.7');
2013-12-17 21:31:04 -02:00
define('MAGALLANES_DIRECTORY', $baseDir);
2011-11-22 09:16:06 -02:00
if (file_exists(__DIR__ . '/../vendor/autoload.php')) {
require_once __DIR__ . '/../vendor/autoload.php';
} else if (file_exists(__DIR__ . '/../../../autoload.php')) {
2014-12-28 14:45:13 +01:00
require_once __DIR__ . '/../../../autoload.php';
}
2016-03-18 14:12:43 +01:00
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);
2014-11-01 19:19:05 -02:00
exit((integer) $exitCode);