当前位置: 首页>>代码示例>>PHP>>正文


PHP ClassLoader::addDirectories方法代码示例

本文整理汇总了PHP中ClassLoader::addDirectories方法的典型用法代码示例。如果您正苦于以下问题:PHP ClassLoader::addDirectories方法的具体用法?PHP ClassLoader::addDirectories怎么用?PHP ClassLoader::addDirectories使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ClassLoader的用法示例。


在下文中一共展示了ClassLoader::addDirectories方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: register

 /**
  * Register the service provider.
  *
  * @return void
  */
 public function register()
 {
     $this->app['xero'] = $this->app->share(function ($app) {
         \ClassLoader::addDirectories(array(__DIR__ . '/PHP-Xero'));
         $config = $this->app['config']['xero'];
         return new \xero($config['key'], $config['secret'], $config['publicPath'], $config['privatePath'], $config['format']);
     });
 }
开发者ID:venturecraft,项目名称:xero-laravel,代码行数:13,代码来源:XeroLaravelServiceProvider.php

示例2: setUp

 public function setUp()
 {
     parent::setUp();
     // enable route filters
     $this->app['router']->enableFilters();
     // create an artisan object for running migrations
     $artisan = $this->app->make('artisan');
     // run the migrations to create Sentry 2 tables
     $artisan->call('migrate', array('--database' => 'testbench', '--path' => '../vendor/cartalyst/sentry/src/migrations'));
     // run our migrations to update the Sentry 2 users table
     $artisan->call('migrate', array('--database' => 'testbench', '--path' => 'migrations'));
     // seed our database tables
     $artisan->call('migrate', array('--database' => 'testbench', '--path' => '../tests/seeds'));
     // Load models
     ClassLoader::addDirectories(array(realpath(__DIR__ . '/models')));
     ClassLoader::load('Foo');
     ClassLoader::load('Bar');
     ClassLoader::load('Baz');
 }
开发者ID:morphatic,项目名称:snapi,代码行数:19,代码来源:SnAPITest.php

示例3: app_path

<?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::addDirectories(array(app_path() . '/commands', app_path() . '/controllers', app_path() . '/models', app_path() . '/database/seeds', app_path() . '/controllers/admin', app_path() . '/controllers/aesthetics', app_path() . '/libraries', app_path() . '/components', app_path() . '/helpers'));
/*
|--------------------------------------------------------------------------
| Application Error Logger
|--------------------------------------------------------------------------
|
| Here we will configure the error logger setup for the application which
| is built on top of the wonderful Monolog library. By default we will
| build a basic log file setup which creates a single file for logs.
|
*/
Log::useFiles(storage_path() . '/logs/laravel.log');
/*
|--------------------------------------------------------------------------
| Application Error Handler
|--------------------------------------------------------------------------
|
| Here you may handle any errors that occur in your application, including
| logging them or displaying custom views for specific errors. You may
开发者ID:kettanyam,项目名称:20141001done,代码行数:31,代码来源:global.php

示例4:

<?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::addDirectories(array());
/*
|--------------------------------------------------------------------------
| Application Error Logger
|--------------------------------------------------------------------------
|
| Here we will configure the error logger setup for the application which
| is built on top of the wonderful Monolog library. By default we will
| build a rotating log file setup which creates a new file each day.
|
*/
$logFile = 'log-' . php_sapi_name() . '.txt';
Log::useDailyFiles(storage_path() . '/logs/' . $logFile);
/*
|--------------------------------------------------------------------------
| Application Error Handler
|--------------------------------------------------------------------------
|
| Here you may handle any errors that occur in your application, including
开发者ID:kleitz,项目名称:bjga-scheduler,代码行数:31,代码来源:global.php

示例5:

<?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::addDirectories(array(app_path() . '/database/seeds'));
/*
|--------------------------------------------------------------------------
| Application Error Logger
|--------------------------------------------------------------------------
|
| Here we will configure the error logger setup for the application which
| is built on top of the wonderful Monolog library. By default we will
| build a basic log file setup which creates a single file for logs.
|
*/
Log::useFiles(storage_path() . '/logs/laravel.log');
/*
|--------------------------------------------------------------------------
| Application Error Handler
|--------------------------------------------------------------------------
|
| Here you may handle any errors that occur in your application, including
| logging them or displaying custom views for specific errors. You may
开发者ID:danielheyman,项目名称:TechDimeProjects,代码行数:31,代码来源:global.php

示例6: app_path

<?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::addDirectories(array(app_path() . '/commands', app_path() . '/controllers', app_path() . '/models', app_path() . '/database/seeds', app_path() . '/classes', app_path() . '/classes/abstract', app_path() . '/classes/interfaces'));
/*
|--------------------------------------------------------------------------
| Application Error Logger
|--------------------------------------------------------------------------
|
| Here we will configure the error logger setup for the application which
| is built on top of the wonderful Monolog library. By default we will
| build a basic log file setup which creates a single file for logs.
|
*/
Log::useFiles(storage_path() . '/logs/laravel.log');
/*
|--------------------------------------------------------------------------
| Application Error Handler
|--------------------------------------------------------------------------
|
| Here you may handle any errors that occur in your application, including
| logging them or displaying custom views for specific errors. You may
开发者ID:GotFly,项目名称:rovers,代码行数:31,代码来源:global.php

示例7: app_path

<?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::addDirectories(array(app_path() . '/commands', app_path() . '/controllers', app_path() . '/classes'));
/*
|--------------------------------------------------------------------------
| Application Error Logger
|--------------------------------------------------------------------------
|
| Here we will configure the error logger setup for the application which
| is built on top of the wonderful Monolog library. By default we will
| build a basic log file setup which creates a single file for logs.
|
*/
Log::useFiles(storage_path() . '/logs/laravel.log');
/*
|--------------------------------------------------------------------------
| Application Error Handler
|--------------------------------------------------------------------------
|
| Here you may handle any errors that occur in your application, including
| logging them or displaying custom views for specific errors. You may
开发者ID:pobeirne,项目名称:IJ_Project_PHP,代码行数:31,代码来源:global.php

示例8: app_path

    if ($exception instanceof \Symfony\Component\HttpKernel\Exception\NotFoundHttpException) {
        Log::error('NotFoundHttpException Route: ' . Request::url());
    }
    Log::error($exception);
});
/*
|--------------------------------------------------------------------------
| 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::addDirectories(array(app_path() . '/commands', app_path() . '/controllers', app_path() . '/presenters', app_path() . '/models', app_path() . '/libraries', app_path() . '/database/migrations', app_path() . '/database/seeds'));
/*
|--------------------------------------------------------------------------
| Application Error Logger
|--------------------------------------------------------------------------
|
| Here we will configure the error logger setup for the application which
| is built on top of the wonderful Monolog library. By default we will
| build a rotating log file setup which creates a new file each day.
|
*/
$logFile = 'log-' . php_sapi_name() . '.txt';
Log::useDailyFiles(storage_path() . '/logs/' . $logFile);
/*
|--------------------------------------------------------------------------
| Application Error Handler
开发者ID:Askedio,项目名称:LaravelCP-v1,代码行数:31,代码来源:global.php

示例9: app_path

<?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::addDirectories(array(app_path() . '/commands', app_path() . '/providers', app_path() . '/validators', app_path() . '/exceptions', app_path() . '/controllers', app_path() . '/models', app_path() . '/database/seeds'));
/*
|--------------------------------------------------------------------------
| Application Error Logger
|--------------------------------------------------------------------------
|
| Here we will configure the error logger setup for the application which
| is built on top of the wonderful Monolog library. By default we will
| build a rotating log file setup which creates a new file each day.
|
*/
$logFile = 'log-' . php_sapi_name() . '.txt';
Log::useDailyFiles(storage_path() . '/logs/' . $logFile);
/*
|--------------------------------------------------------------------------
| Application Error Handler
|--------------------------------------------------------------------------
|
| Here you may handle any errors that occur in your application, including
开发者ID:tallcoder,项目名称:Reservations,代码行数:31,代码来源:global.php

示例10: app_path

<?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::addDirectories(array(app_path() . '/commands', app_path() . '/controllers', app_path() . '/controllers/admin', app_path() . '/controllers/site', app_path() . '/models', app_path() . '/database/seeds', app_path() . '/services', app_path() . '/helpers'));
/*
|--------------------------------------------------------------------------
| Application Error Logger
|--------------------------------------------------------------------------
|
| Here we will configure the error logger setup for the application which
| is built on top of the wonderful Monolog library. By default we will
| build a basic log file setup which creates a single file for logs.
|
*/
Log::useFiles(storage_path() . '/logs/laravel.log');
/*
|--------------------------------------------------------------------------
| Application Error Handler
|--------------------------------------------------------------------------
|
| Here you may handle any errors that occur in your application, including
| logging them or displaying custom views for specific errors. You may
开发者ID:trantung,项目名称:company,代码行数:31,代码来源:global.php

示例11: app_path

| load your controllers and models. This is useful for keeping all of
| your classes in the "global" namespace without Composer updating.
|
*/
ClassLoader::addDirectories(array(app_path() . '/commands', app_path() . '/controllers', app_path() . '/models', app_path() . '/database/seeds', app_path() . '/plugins'));
/*
|--------------------------------------------------------------------------
| Plugin registering
|--------------------------------------------------------------------------
|
| We want to add class support to any more complex classes with a subfolder
| structure, so we'll load in the directory /plugins as well as scanning
| the direct folder.
|
*/
ClassLoader::addDirectories(File::directories(app_path() . '/plugins'));
/*
|--------------------------------------------------------------------------
| Theme functions
|--------------------------------------------------------------------------
|
| Built on top of Laravel is our custom theme functions, we need to make
| sure they're all loaded so there's no errors
|
*/
$functions = array('metadata', 'theme', 'page');
foreach ($functions as $function) {
    require app_path() . '/functions/' . $function . '.php';
}
View::addNamespace('theme', 'public/themes/' . Metadata::item('theme', 'default'));
View::addLocation(get_theme_path('layouts'));
开发者ID:BinaryGeometry,项目名称:aviate,代码行数:31,代码来源:global.php

示例12: app_path

<?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::addDirectories(array(app_path() . '/commands', app_path() . '/controllers', app_path() . '/models', app_path() . '/database', app_path() . '/libraries', app_path() . '/libraries/AllStats'));
/*
|--------------------------------------------------------------------------
| Application Error Logger
|--------------------------------------------------------------------------
|
| Here we will configure the error logger setup for the application which
| is built on top of the wonderful Monolog library. By default we will
| build a basic log file setup which creates a single file for logs.
|
*/
$logFile = 'laravel.log';
Log::useDailyFiles(storage_path() . '/logs/' . $logFile);
/*
|--------------------------------------------------------------------------
| Application Error Handler
|--------------------------------------------------------------------------
|
| Here you may handle any errors that occur in your application, including
开发者ID:neraunzaran,项目名称:fruit-dashboard,代码行数:31,代码来源:global.php

示例13:

<?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::addDirectories([app_path() . '/database/seeds']);
/*
 |--------------------------------------------------------------------------
 | Application Error Logger
 |--------------------------------------------------------------------------
 |
 | Here we will configure the error logger setup for the application which
 | is built on top of the wonderful Monolog library. By default we will
 | build a basic log file setup which creates a single file for logs.
 |
*/
Log::useFiles(storage_path() . '/logs/laravel.log');
/*
 |--------------------------------------------------------------------------
 | Application Error Handler
 |--------------------------------------------------------------------------
 |
 | Here you may handle any errors that occur in your application, including
 | logging them or displaying custom views for specific errors. You may
开发者ID:edrands,项目名称:laravel-seeder,代码行数:31,代码来源:global.php

示例14: app_path

<?php

use Illuminate\Database\Eloquent\ModelNotFoundException;
/*
|--------------------------------------------------------------------------
| 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::addDirectories(array(app_path() . '/commands', app_path() . '/controllers', app_path() . '/models', app_path() . '/validation', app_path() . '/database/seeds', app_path() . '/biblioteca'));
Validator::resolver(function ($translator, $data, $rules, $messages) {
    return new CustomValidator($translator, $data, $rules, $messages);
});
/*
|--------------------------------------------------------------------------
| Application Error Logger
|--------------------------------------------------------------------------
|
| Here we will configure the error logger setup for the application which
| is built on top of the wonderful Monolog library. By default we will
| build a basic log file setup which creates a single file for logs.
|
*/
Log::useFiles(storage_path() . '/logs/laravel.log');
/*
|--------------------------------------------------------------------------
| Application Error Handler
开发者ID:albafo,项目名称:web.Adehon,代码行数:31,代码来源:global.php

示例15: app_path

 *    See the GNU Affero General Public License for more details.
 *
 *    You should have received a copy of the GNU Affero General Public License
 *    along with osu!web.  If not, see <http://www.gnu.org/licenses/>.
 */
/*
|--------------------------------------------------------------------------
| 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::addDirectories([app_path() . '/commands', app_path() . '/controllers', app_path() . '/models', app_path() . '/database/seeds', app_path() . '/lib', app_path() . '/traits']);
/*
|--------------------------------------------------------------------------
| Reponse::route() macro
|--------------------------------------------------------------------------
|
| Provides the ability to supply both AJAX and regular redirects at
| the same time. Will always generate relative Location headers,
| and will default to "home" ("/") if no route was found.
| IDs/params to pass to the URL can be passed in.
|
*/
Response::macro('route', function ($url, $ids = [], $params = null) {
    try {
        $url = URL::route($url, $ids, $absolute = false);
    } catch (Exception $e) {
开发者ID:NiHikKi,项目名称:osu-web,代码行数:31,代码来源:global.php


注:本文中的ClassLoader::addDirectories方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。