當前位置: 首頁>>代碼示例>>PHP>>正文


PHP AliasLoader::getInstance方法代碼示例

本文整理匯總了PHP中Illuminate\Foundation\AliasLoader::getInstance方法的典型用法代碼示例。如果您正苦於以下問題:PHP AliasLoader::getInstance方法的具體用法?PHP AliasLoader::getInstance怎麽用?PHP AliasLoader::getInstance使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Illuminate\Foundation\AliasLoader的用法示例。


在下文中一共展示了AliasLoader::getInstance方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: register

 /**
  * Register the service provider.
  */
 public function register()
 {
     $this->app->booting(function () {
         $loader = AliasLoader::getInstance();
         $loader->alias('TriplePivot', 'Jeylabs\\TriplePivot\\Facades\\TriplePivot');
     });
 }
開發者ID:jeylabs,項目名稱:vivid,代碼行數:10,代碼來源:TriplePivotServiceProvider.php

示例2: register

 /**
  * Register the service provider.
  *
  * @return void
  */
 public function register()
 {
     // Receipt
     $this->app['nexmoreceipt'] = $this->app->share(function ($app) {
         return new Account();
     });
     $this->app->booting(function () {
         $loader = \Illuminate\Foundation\AliasLoader::getInstance();
         $loader->alias('NexmoReceipt', 'Artistan\\Nexmo\\Facades\\Receipt');
     });
     // Account
     $this->app['nexmoaccount'] = $this->app->share(function ($app) {
         return new Account();
     });
     $this->app->booting(function () {
         $loader = \Illuminate\Foundation\AliasLoader::getInstance();
         $loader->alias('NexmoAccount', 'Artistan\\Nexmo\\Facades\\Account');
     });
     // SMS Message
     $this->app['nexmosmsmessage'] = $this->app->share(function ($app) {
         return new MessageSms();
     });
     $this->app->booting(function () {
         $loader = \Illuminate\Foundation\AliasLoader::getInstance();
         $loader->alias('NexmoSmsMessage', 'Artistan\\Nexmo\\Facades\\Message\\Sms');
     });
 }
開發者ID:roarkmccolgan,項目名稱:nexmo,代碼行數:32,代碼來源:NexmoServiceProvider.php

示例3: registerAliases

 /**
  * Register some Aliases
  * @return $this
  */
 protected function registerAliases()
 {
     foreach ($this->aliases as $alias => $original) {
         AliasLoader::getInstance()->alias($alias, $original);
     }
     return $this;
 }
開發者ID:kyxer,項目名稱:barriosLaravel,代碼行數:11,代碼來源:LaravelAdminServiceProvider.php

示例4: register

 /**
  * Register any package services.
  *
  * @return void
  */
 public function register()
 {
     $this->registerCrudeCRUD();
     config(['config/crude.php']);
     $loader = \Illuminate\Foundation\AliasLoader::getInstance();
     $loader->alias('Crude', 'JanDolata\\CrudeCRUD\\Engine\\Crude');
     $loader->alias('CrudeListInterface', 'JanDolata\\CrudeCRUD\\Engine\\Interfaces\\ListInterface');
     $loader->alias('CrudeUpdateInterface', 'JanDolata\\CrudeCRUD\\Engine\\Interfaces\\UpdateInterface');
     $loader->alias('CrudeDeleteInterface', 'JanDolata\\CrudeCRUD\\Engine\\Interfaces\\DeleteInterface');
     $loader->alias('CrudeStoreInterface', 'JanDolata\\CrudeCRUD\\Engine\\Interfaces\\StoreInterface');
     $loader->alias('CrudeOrderInterface', 'JanDolata\\CrudeCRUD\\Engine\\Interfaces\\OrderInterface');
     $loader->alias('CrudeWithValidationInterface', 'JanDolata\\CrudeCRUD\\Engine\\Interfaces\\WithValidationInterface');
     $loader->alias('CrudeWithThumbnailInterface', 'JanDolata\\CrudeCRUD\\Engine\\Interfaces\\WithThumbnailInterface');
     $loader->alias('CrudeWithFileInterface', 'JanDolata\\CrudeCRUD\\Engine\\Interfaces\\WithFileInterface');
     $loader->alias('CrudeCRUDInterface', 'JanDolata\\CrudeCRUD\\Engine\\Interfaces\\CRUDInterface');
     $loader->alias('CrudeCRUDWithValidationInterface', 'JanDolata\\CrudeCRUD\\Engine\\Interfaces\\CRUDWithValidationInterface');
     $loader->alias('CrudeFromModelTrait', 'JanDolata\\CrudeCRUD\\Engine\\Traits\\FromModelTrait');
     $loader->alias('CrudeWithValidationTrait', 'JanDolata\\CrudeCRUD\\Engine\\Traits\\WithValidationTrait');
     $loader->alias('CrudeWithThumbnailTrait', 'JanDolata\\CrudeCRUD\\Engine\\Traits\\WithThumbnailTrait');
     $loader->alias('CrudeWithFileTrait', 'JanDolata\\CrudeCRUD\\Engine\\Traits\\WithFileTrait');
     $loader->alias('CrudeCrudeSetup', 'JanDolata\\CrudeCRUD\\Engine\\CrudeSetup');
     $loader->alias('CrudeFileLog', 'JanDolata\\CrudeCRUD\\Engine\\Models\\FileLog');
     $loader->alias('CrudeFiles', 'JanDolata\\CrudeCRUD\\Engine\\Helpers\\CrudeFiles');
     $loader->alias('CrudeData', 'JanDolata\\CrudeCRUD\\Engine\\Helpers\\CrudeData');
     $loader->alias('CrudeOptions', 'JanDolata\\CrudeCRUD\\Engine\\Helpers\\CrudeOptions');
     $loader->alias('CrudeQueryHelper', 'JanDolata\\CrudeCRUD\\Engine\\Helpers\\CrudeQueryHelper');
 }
開發者ID:jan-dolata,項目名稱:crude-crud,代碼行數:32,代碼來源:CrudeCRUDServiceProvider.php

示例5: registerAlias

 /**
  * Register the alias for package.
  *
  * @return void
  */
 protected function registerAlias()
 {
     $this->app->booting(function () {
         $loader = \Illuminate\Foundation\AliasLoader::getInstance();
         $loader->alias('Omni', 'Sorora\\Omni\\Facades\\Omni');
     });
 }
開發者ID:sorora,項目名稱:omni,代碼行數:12,代碼來源:OmniServiceProvider.php

示例6: register

 public function register()
 {
     $url = parse_url(url()->current());
     if (isset($url['path']) && substr($url['path'], 1, 7) == 'backend') {
         $this->app->register(\Shopvel\ServiceProvider\BackendServiceProvider::class);
     } else {
         $this->app->register(\Shopvel\ServiceProvider\FrontendServiceProvider::class);
     }
     $loader = \Illuminate\Foundation\AliasLoader::getInstance();
     /*
      * Theme Setup
      */
     $loader->alias('Theme', \Shopvel\Facade\ThemeFacade::class);
     $this->app->singleton('shopvel.theme', function () {
         return new \Shopvel\Component\Theme\Themes();
     });
     $this->app->singleton('view.finder', function ($app) {
         $paths = $app['config']['view.paths'];
         return new \Shopvel\Component\Theme\ThemeViewFinder($app['files'], $paths, null, $app['shopvel.theme']);
     });
     $theme = $this->app->make('shopvel.theme');
     $theme->set(Config::get('theme.name'));
     /*
      * Language Setup
      */
     $loader->alias('Language', \Shopvel\Facade\LanguageFacade::class);
     $this->app->singleton('shopvel.language', function () {
         return new \Shopvel\Component\Language\Language();
     });
 }
開發者ID:shopvel,項目名稱:shopvel,代碼行數:30,代碼來源:CoreServiceProvider.php

示例7: registerFacade

 /**
  * Register the vault facade without the user having to add it to the app.php file.
  *
  * @return void
  */
 public function registerFacade()
 {
     $this->app->booting(function () {
         $loader = \Illuminate\Foundation\AliasLoader::getInstance();
         $loader->alias('Access', \App\Services\Access\Facades\Access::class);
     });
 }
開發者ID:binaryk,項目名稱:terenuripedia,代碼行數:12,代碼來源:AccessServiceProvider.php

示例8: boot

 /**
  * Perform post-registration booting of services.
  *
  * @return void
  */
 public function boot()
 {
     $loader = AliasLoader::getInstance();
     // Add 'Form' and 'Html' facade aliases
     $loader->alias('Form', 'Illuminate\\Html\\FormFacade');
     $loader->alias('Html', 'Illuminate\\Html\\HtmlFacade');
 }
開發者ID:stolz,項目名稱:laravel-form-builder,代碼行數:12,代碼來源:ServiceProvider.php

示例9: register

 /**
  * Register the service provider.
  */
 public function register()
 {
     $this->app->singleton('vinelab.assistant.formatter', function () {
         return new Formatter();
     });
     $this->app->booting(function () {
         $loader = \Illuminate\Foundation\AliasLoader::getInstance();
         $loader->alias('Formatter', 'Vinelab\\Assistant\\Facades\\Formatter');
     });
     $this->app->singleton('vinelab.assistant.devicedetector', function () {
         return new DeviceDetector();
     });
     $this->app->booting(function () {
         $loader = \Illuminate\Foundation\AliasLoader::getInstance();
         $loader->alias('DeviceDetector', 'Vinelab\\Assistant\\Facades\\DeviceDetector');
     });
     $this->app->singleton('vinelab.assistant.generator', function () {
         return new Generator();
     });
     $this->app->booting(function () {
         $loader = \Illuminate\Foundation\AliasLoader::getInstance();
         $loader->alias('Generator', 'Vinelab\\Assistant\\Facades\\Generator');
     });
     $this->app->singleton('vinelab.assistant.address', function () {
         return new Address();
     });
     $this->app->booting(function () {
         $loader = \Illuminate\Foundation\AliasLoader::getInstance();
         $loader->alias('Address', 'Vinelab\\Assistant\\Facades\\Address');
     });
 }
開發者ID:harris21,項目名稱:assistant,代碼行數:34,代碼來源:AssistantServiceProvider.php

示例10: registerFacade

 /**
  * Register the Notify:: facade
  */
 private function registerFacade()
 {
     $this->app->booting(function () {
         $loader = AliasLoader::getInstance();
         $loader->alias('GsalesApiClient', 'Rokde\\Gsales\\Api\\Supports\\Laravel\\GsalesApiClientFacade');
     });
 }
開發者ID:cwd,項目名稱:gsales-api-client,代碼行數:10,代碼來源:LaravelGsalesApiClientServiceProvider.php

示例11: registerAlias

 /**
  * Register the alias for package.
  *
  * @return void
  */
 protected function registerAlias()
 {
     $this->app->booting(function () {
         $loader = AliasLoader::getInstance();
         $loader->alias('Steam', 'Syntax\\SteamApi\\Facades\\SteamApi');
     });
 }
開發者ID:adamdburton,項目名稱:Steam,代碼行數:12,代碼來源:SteamApiServiceProvider.php

示例12: register

 /**
  * Register the service provider.
  *
  * @return void
  */
 public function register()
 {
     // Register 'neo4j' instance container to our 'neo4j' object
     $this->app['neo4j'] = $this->app->share(function ($app) {
         // connection credentials loaded from config
         // if neo4j key exists in database.php config use this one
         if (Config::get('database.neo4j') != null) {
             $host = Config::get('database.neo4j.default.host');
             $port = Config::get('database.neo4j.default.port');
             $username = Config::get('database.neo4j.default.username');
             $password = Config::get('database.neo4j.default.password');
             // esle try to find config in packages configs
         } else {
             $host = Config::get('neo4j-4-laravel::default.host');
             $port = Config::get('neo4j-4-laravel::default.port');
             $username = Config::get('neo4j-4-laravel::default.username');
             $password = Config::get('neo4j-4-laravel::default.password');
         }
         // create mew neo4j node
         $neo4j = new Client($host, $port);
         $neo4j->getTransport()->setAuth($username, $password);
         // return pusher
         return $neo4j;
     });
     // Shortcut so developers don't need to add an Alias in app/config/app.php
     $this->app->booting(function () {
         $loader = AliasLoader::getInstance();
         $loader->alias('Neo4j', 'Artdarek\\Neo4j\\Facades\\Neo4j');
     });
 }
開發者ID:artdarek,項目名稱:neo4j-4-laravel,代碼行數:35,代碼來源:Neo4jServiceProvider.php

示例13: registerAlias

 protected function registerAlias()
 {
     $config = $this->app->config->get('authorization');
     if ($config['auto_alias'] === true) {
         \Illuminate\Foundation\AliasLoader::getInstance()->alias($config['alias'], AuthorizationFacade::class);
     }
 }
開發者ID:thinhbuzz,項目名稱:laravel-advanced-authorization,代碼行數:7,代碼來源:AuthorizationServiceProvider.php

示例14: register

 public function register()
 {
     $this->app->booting(function () {
         AliasLoader::getInstance()->alias('GifResponse', 'NemC\\Simplytics\\Facades\\GifResponse');
         AliasLoader::getInstance()->alias('JavaScriptResponse', 'NemC\\Simplytics\\Facades\\JavaScriptResponse');
     });
 }
開發者ID:nem-c,項目名稱:simplytics,代碼行數:7,代碼來源:FacadeProvider.php

示例15: registerFacade

 /**
  *
  */
 public function registerFacade()
 {
     $this->app->booting(function () {
         $loader = \Illuminate\Foundation\AliasLoader::getInstance();
         $loader->alias('History', HistoryFacade::class);
     });
 }
開發者ID:blomdahldaniel,項目名稱:laravel-5-boilerplate,代碼行數:10,代碼來源:HistoryServiceProvider.php


注:本文中的Illuminate\Foundation\AliasLoader::getInstance方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。