Browse Source

added old style auto loader setup in addition to composer.

Taylor Otwell 12 years ago
parent
commit
b03521fabc
2 changed files with 48 additions and 29 deletions
  1. 30 29
      app/config/app.php
  2. 18 0
      app/start/global.php

+ 30 - 29
app/config/app.php

@@ -135,35 +135,36 @@ return array(
 
 
 	'aliases' => array(
 	'aliases' => array(
 
 
-		'App'        => 'Illuminate\Support\Facades\App',
-		'Artisan'    => 'Illuminate\Support\Facades\Artisan',
-		'Auth'       => 'Illuminate\Support\Facades\Auth',
-		'Blade'      => 'Illuminate\Support\Facades\Blade',
-		'Cache'      => 'Illuminate\Support\Facades\Cache',
-		'Config'     => 'Illuminate\Support\Facades\Config',
-		'Controller' => 'Illuminate\Routing\Controllers\Controller',
-		'Cookie'     => 'Illuminate\Support\Facades\Cookie',
-		'Crypt'      => 'Illuminate\Support\Facades\Crypt',
-		'DB'         => 'Illuminate\Support\Facades\DB',
-		'Eloquent'   => 'Illuminate\Database\Eloquent\Model',
-		'Event'      => 'Illuminate\Support\Facades\Event',
-		'File'       => 'Illuminate\Support\Facades\File',
-		'Hash'       => 'Illuminate\Support\Facades\Hash',
-		'Input'      => 'Illuminate\Support\Facades\Input',
-		'Lang'       => 'Illuminate\Support\Facades\Lang',
-		'Log'        => 'Illuminate\Support\Facades\Log',
-		'Mail'       => 'Illuminate\Support\Facades\Mail',
-		'Paginator'  => 'Illuminate\Support\Facades\Paginator',
-		'Redirect'   => 'Illuminate\Support\Facades\Redirect',
-		'Redis'      => 'Illuminate\Support\Facades\Redis',
-		'Request'    => 'Illuminate\Support\Facades\Request',
-		'Response'   => 'Illuminate\Support\Facades\Response',
-		'Route'      => 'Illuminate\Support\Facades\Route',
-		'Schema'     => 'Illuminate\Support\Facades\Schema',
-		'Session'    => 'Illuminate\Support\Facades\Session',
-		'URL'        => 'Illuminate\Support\Facades\URL',
-		'Validator'  => 'Illuminate\Support\Facades\Validator',
-		'View'       => 'Illuminate\Support\Facades\View',
+		'App'         => 'Illuminate\Support\Facades\App',
+		'Artisan'     => 'Illuminate\Support\Facades\Artisan',
+		'Auth'        => 'Illuminate\Support\Facades\Auth',
+		'Blade'       => 'Illuminate\Support\Facades\Blade',
+		'Cache'       => 'Illuminate\Support\Facades\Cache',
+		'ClassLoader' => 'Illuminate\Foundation\ClassLoader',
+		'Config'      => 'Illuminate\Support\Facades\Config',
+		'Controller'  => 'Illuminate\Routing\Controllers\Controller',
+		'Cookie'      => 'Illuminate\Support\Facades\Cookie',
+		'Crypt'       => 'Illuminate\Support\Facades\Crypt',
+		'DB'          => 'Illuminate\Support\Facades\DB',
+		'Eloquent'    => 'Illuminate\Database\Eloquent\Model',
+		'Event'       => 'Illuminate\Support\Facades\Event',
+		'File'        => 'Illuminate\Support\Facades\File',
+		'Hash'        => 'Illuminate\Support\Facades\Hash',
+		'Input'       => 'Illuminate\Support\Facades\Input',
+		'Lang'        => 'Illuminate\Support\Facades\Lang',
+		'Log'         => 'Illuminate\Support\Facades\Log',
+		'Mail'        => 'Illuminate\Support\Facades\Mail',
+		'Paginator'   => 'Illuminate\Support\Facades\Paginator',
+		'Redirect'    => 'Illuminate\Support\Facades\Redirect',
+		'Redis'       => 'Illuminate\Support\Facades\Redis',
+		'Request'     => 'Illuminate\Support\Facades\Request',
+		'Response'    => 'Illuminate\Support\Facades\Response',
+		'Route'       => 'Illuminate\Support\Facades\Route',
+		'Schema'      => 'Illuminate\Support\Facades\Schema',
+		'Session'     => 'Illuminate\Support\Facades\Session',
+		'URL'         => 'Illuminate\Support\Facades\URL',
+		'Validator'   => 'Illuminate\Support\Facades\Validator',
+		'View'        => 'Illuminate\Support\Facades\View',
 
 
 	),
 	),
 
 

+ 18 - 0
app/start/global.php

@@ -1,5 +1,23 @@
 <?php
 <?php
 
 
+/*
+|--------------------------------------------------------------------------
+| Register The Laravel Class Loader
+|--------------------------------------------------------------------------
+|
+| In addition to using Composer, you may use the Laravel class loader to
+| load your controllers and models. This is useful for keeping all of
+| your classes in the "global" namespace without Composer updating.
+|
+*/
+
+ClassLoader::register(new ClassLoader(array(
+
+	app_path().'/controllers',
+	app_path().'/models',
+
+)));
+
 /*
 /*
 |--------------------------------------------------------------------------
 |--------------------------------------------------------------------------
 | Application Error Logger
 | Application Error Logger