Browse Source

Load core classes wit hcomposer autoloader

1.0
Kuba Turek 11 years ago committed by Jakub Turek
parent
commit
300cc4c56f
  1. 7
      bin/mage
  2. 5
      composer.json

7
bin/mage

@ -9,8 +9,6 @@
* file that was distributed with this source code. * file that was distributed with this source code.
*/ */
use Mage\Autoload;
date_default_timezone_set('UTC'); date_default_timezone_set('UTC');
$baseDir = dirname(dirname(__FILE__)); $baseDir = dirname(dirname(__FILE__));
@ -18,10 +16,7 @@ $baseDir = dirname(dirname(__FILE__));
define('MAGALLANES_VERSION', '1.0.1'); define('MAGALLANES_VERSION', '1.0.1');
define('MAGALLANES_DIRECTORY', $baseDir); define('MAGALLANES_DIRECTORY', $baseDir);
// Preload require_once __DIR__ . '/../vendor/autoload.php';
require_once $baseDir . '/Mage/Autoload.php';
$loader = new Autoload();
spl_autoload_register(array($loader, 'autoLoad'));
// Clean arguments // Clean arguments
array_shift($argv); array_shift($argv);

5
composer.json

@ -8,6 +8,11 @@
"require": { "require": {
"php": ">=5.3" "php": ">=5.3"
}, },
"autoload": {
"psr-4": {
"Mage\\": "./Mage"
}
},
"bin": [ "bin": [
"bin/mage" "bin/mage"
] ]

Loading…
Cancel
Save