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


PHP View::addNamespace方法代碼示例

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


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

示例1: __construct

 /**
  * Create a new command instance.
  *
  * @return void
  */
 public function __construct()
 {
     parent::__construct();
     $this->moduleDirectory = $this->getModuleDirectory();
     $this->generatorsDirectory = $this->getGeneratorsDirectory();
     \View::addNamespace('pmgenviews', $this->generatorsDirectory);
 }
開發者ID:epigra,項目名稱:pmgen,代碼行數:12,代碼來源:MigrationGenerator.php

示例2: boot

 /**
  * Bootstrap the application events.
  *
  * @return void
  */
 public function boot()
 {
     $this->package('cednet/cms');
     $this->workbenchPath = __DIR__ . '/../..';
     include __DIR__ . '/../../routes_cms.php';
     \View::addNamespace('cms', __DIR__ . '/../../views');
     \Lang::addNamespace('cms', __DIR__ . '/../../lang');
 }
開發者ID:cednet,項目名稱:laravel-cms-addon,代碼行數:13,代碼來源:CmsServiceProvider.php

示例3: __construct

 public function __construct()
 {
     $this->now = date("Y/m/d H:i:s");
     $this->ConfigFolder = realpath(__DIR__ . '/../../../config/banks/' . $this->drivername . '/');
     $this->bankConfig = \Config::get('Payby::banks\\' . $this->drivername . '\\config.info');
     \View::addLocation($this->ConfigFolder);
     \View::addNamespace('Payby', $this->ConfigFolder);
 }
開發者ID:miladr,項目名稱:payby,代碼行數:8,代碼來源:DriverAbstract.php

示例4: boot

 /**
  * Bootstrap the application events.
  *
  * @return void
  */
 public function boot()
 {
     \View::addNamespace('voltcms/pages', __DIR__ . '/../../views');
     $this->package('voltcms/pages');
     CMS::addMenuItem('Pages', 'dashboard/pages');
     CMS::addJSFile('packages/voltcms/pages/js/custom.js');
     CMS::addJSFile('packages/voltcms/pages/js/app.js');
 }
開發者ID:voltcms,項目名稱:pages,代碼行數:13,代碼來源:PagesServiceProvider.php

示例5: registerViewNamespace

 protected function registerViewNamespace()
 {
     $childClass = get_class($this);
     $exploded = explode('\\', $childClass);
     $className = array_pop($exploded);
     $path = __DIR__ . '/../fields/' . str_replace('_', '-', snake_case($className));
     \View::addNamespace($childClass, $path);
 }
開發者ID:orangehill,項目名稱:photon,代碼行數:8,代碼來源:Field.php

示例6: boot

 public function boot()
 {
     View::addNamespace('mailer', __DIR__ . '/../src/Components/views/mailer');
     View::addNamespace('cmd', app_path() . '/commands/views');
     View::addNamespace('socials', app_path('/src/Components/views/socials'));
     View::addNamespace('flash', app_path('src/Components/views/flashes'));
     View::addExtension('html', 'php');
     Validation::extend();
 }
開發者ID:evo9,項目名稱:dryharder,代碼行數:9,代碼來源:BaseServiceProvider.php

示例7: boot

 /**
  * Register the service provider.
  *
  * @return void
  */
 public function boot()
 {
     \View::addNamespace('voltcms/backup', __DIR__ . '/../../views');
     $this->package('voltcms/backup');
     $this->registerBackupCommand();
     $this->app->bind('Voltcms\\Backup\\uploader\\uploaderInterface', 'Voltcms\\Backup\\uploader\\GlacierUploader');
     $this->app->bind('aws', 'Voltcms\\Backup\\uploader\\implementations\\AWSUploader');
     $this->app->bind('dropbox', 'Voltcms\\Backup\\uploader\\implementations\\DropboxUploader');
 }
開發者ID:voltcms,項目名稱:backup,代碼行數:14,代碼來源:BackupServiceProvider.php

示例8: boot

 /**
  * Bootstrap the application events.
  *
  * @return void
  */
 public function boot()
 {
     $this->package('yaro/jarboe');
     include __DIR__ . '/../../helpers.php';
     include __DIR__ . '/../../filters.php';
     include __DIR__ . '/../../routes.php';
     include __DIR__ . '/../../view_composers.php';
     \View::addNamespace('admin', __DIR__ . '/../../views/');
 }
開發者ID:OlesKashchenko,項目名稱:Jarboe,代碼行數:14,代碼來源:JarboeServiceProvider.php

示例9: boot

 /**
  * Bootstrap the application events.
  *
  * @return void
  */
 public function boot()
 {
     $this->package('jeroen-g/laravel-photo-gallery', 'gallery');
     // Views will first be sought in app/views/gallery before the package view is used.
     \View::addNamespace('gallery', app_path() . '/views/gallery');
     \View::addNamespace('gallery', __DIR__ . '/../../views');
     // Shortcut for using the gallery language lines.
     \Lang::addNamespace('gallery', __DIR__ . '/../../lang');
     include __DIR__ . '/../../routes.php';
 }
開發者ID:DrudgeRajen,項目名稱:laravel-photo-gallery,代碼行數:15,代碼來源:LaravelPhotoGalleryServiceProvider.php

示例10: boot

 /**
  * Bootstrap the application events.
  *
  * @return void
  */
 public function boot()
 {
     \View::addNamespace('voltcms/voltcms', __DIR__ . '/../../views');
     $this->package('voltcms/voltcms');
     $this->registerInstalationCommand();
     CMS::addCSSFile('packages/voltcms/voltcms/css/reset.css');
     CMS::addCSSFile('packages/voltcms/voltcms/css/style.css');
     CMS::addCSSFile('packages/voltcms/voltcms/redactor/redactor.css');
     CMS::addJSFile('packages/voltcms/voltcms/redactor/redactor.min.js');
     CMS::addJSFile('packages/voltcms/voltcms/js/retina.min.js');
 }
開發者ID:voltcms,項目名稱:voltcms,代碼行數:16,代碼來源:VoltcmsServiceProvider.php

示例11: boot

 /**
  * Bootstrap the application events.
  */
 public function boot()
 {
     $configPath = base_path('vendor/rtconner/laravel-addresses/src/config/config.php');
     $viewsPath = base_path('vendor/rtconner/laravel-addresses/src/views');
     $migrationsPath = base_path('vendor/rtconner/laravel-addresses/src/migrations');
     $seedsPath = base_path('vendor/rtconner/laravel-addresses/src/migrations/seeds');
     $this->publishes([$migrationsPath => database_path() . '/migrations']);
     $this->publishes([$seedsPath => database_path() . '/seeds']);
     $this->publishes([$configPath => config_path('addresses.php')], 'config');
     \View::addNamespace('addresses', $viewsPath);
     $this->loadViewsFrom($viewsPath, 'Addresses');
 }
開發者ID:theguild,項目名稱:laravel-addresses,代碼行數:15,代碼來源:AddressesServiceProvider.php

示例12: create

 /**
  * Creating new services, namespaces and others.
  *
  * @return void
  */
 protected function create($module)
 {
     $path = $this->path;
     \View::addNamespace($module, $path . $module . '/views');
     \Config::addNamespace($module, $path . $module . '/config');
     // create aliases for controllers and models
     $use_alias = \Config::get($module . '::app.alias');
     if ($use_alias == TRUE) {
         $this->createAliases($module);
     }
     $modulePath = $path . $module;
     \ClassLoader::addDirectories(array($modulePath . '/commands', $modulePath . '/controllers', $modulePath . '/models', $modulePath . '/database/seeds'));
 }
開發者ID:acmadi,項目名稱:modules,代碼行數:18,代碼來源:Module.php

示例13: boot

 /**
  * Bootstrap the application events.
  *
  * @return void
  */
 public function boot()
 {
     $this->package('vis/builder');
     include __DIR__ . '/../../helpers.php';
     include __DIR__ . '/../../filters.php';
     include __DIR__ . '/../../routes.php';
     include __DIR__ . '/../../view_composers.php';
     include __DIR__ . '/../../events/settings.php';
     include __DIR__ . '/../../events/users.php';
     include __DIR__ . '/../../events/translate.php';
     include __DIR__ . '/../../events/table.php';
     $this->app['config']->package('builder', app_path() . '/config/packages/vis/builder/', "builder");
     \View::addNamespace('admin', __DIR__ . '/../../views/');
 }
開發者ID:arturishe21,項目名稱:buider,代碼行數:19,代碼來源:BuilderServiceProvider.php

示例14: boot

 /**
  * {@inheritDoc}
  */
 public function boot()
 {
     $this->package('payum/payum-laravel-package');
     \View::addNamespace('payum/payum', __DIR__ . '/../../views');
     $this->app->error(function (ReplyInterface $reply) {
         $response = null;
         if ($reply instanceof SymfonyHttpResponse) {
             $response = $reply->getResponse();
         } elseif ($reply instanceof HttpResponse) {
             $response = new Response($reply->getContent());
         } elseif ($reply instanceof HttpRedirect) {
             $response = new RedirectResponse($reply->getUrl());
         }
         if ($response) {
             return $response;
         }
         $ro = new \ReflectionObject($reply);
         throw new LogicException(sprintf('Cannot convert reply %s to Laravel response.', $ro->getShortName()), null, $reply);
     });
     \Route::any('/payment/authorize/{payum_token}', array('as' => 'payum_authorize_do', 'uses' => 'Payum\\LaravelPackage\\Controller\\AuthorizeController@doAction'));
     \Route::any('/payment/capture/{payum_token}', array('as' => 'payum_capture_do', 'uses' => 'Payum\\LaravelPackage\\Controller\\CaptureController@doAction'));
     \Route::any('/payment/refund/{payum_token}', array('as' => 'payum_refund_do', 'uses' => 'Payum\\LaravelPackage\\Controller\\RefundController@doAction'));
     \Route::get('/payment/notify/{payum_token}', array('as' => 'payum_notify_do', 'uses' => 'Payum\\LaravelPackage\\Controller\\NotifyController@doAction'));
     \Route::get('/payment/notify/unsafe/{payment_name}', array('as' => 'payum_notify_do_unsafe', 'uses' => 'Payum\\LaravelPackage\\Controller\\NotifyController@doUnsafeAction'));
     $this->app['payum'] = $this->app->share(function ($app) {
         //TODO add exceptions if invalid payments and storages options set.
         $payum = new ContainerAwareRegistry(\Config::get('payum-laravel-package::payments'), \Config::get('payum-laravel-package::storages'));
         $payum->setContainer($app);
         return $payum;
     });
     $this->app['payum.security.token_storage'] = $this->app->share(function ($app) {
         //TODO add exceptions if invalid payments and storages options set.
         $tokenStorage = \Config::get('payum-laravel-package::token_storage');
         return is_object($tokenStorage) ? $tokenStorage : $app[$tokenStorage];
     });
     $this->app['payum.security.token_factory'] = $this->app->share(function ($app) {
         return new TokenFactory($app['payum.security.token_storage'], $app['payum'], 'payum_capture_do', 'payum_notify_do', 'payum_authorize_do', 'payum_refund_do');
     });
     $this->app['payum.security.http_request_verifier'] = $this->app->share(function ($app) {
         return new HttpRequestVerifier($app['payum.security.token_storage']);
     });
 }
開發者ID:ateixeira,項目名稱:PayumLaravelPackage,代碼行數:45,代碼來源:PayumServiceProvider.php

示例15: register

 public function register()
 {
     //
     \View::addNamespace('BW', __DIR__ . '/../../views');
     //
     $this->app->register('BW\\Providers\\FlashServiceProvider');
     $this->app->register('BW\\Providers\\CommandServiceProvider');
     $this->app->register('BW\\Providers\\ComposerServiceProvider');
     // Register facade
     $this->app->bind('bw.admin', function ($app) {
         return new \BW\BWAdmin();
     });
     // Register alias
     $loader = \Illuminate\Foundation\AliasLoader::getInstance();
     $loader->alias('BWAdmin', 'BW\\Support\\Facades\\BWFacade');
     //
     \App::bind('Illuminate\\Routing\\ResourceRegistrar', function () {
         return \App::make('BW\\Providers\\ResourceNoPrefixRegistrar');
     });
 }
開發者ID:eliasrosa,項目名稱:bw-core,代碼行數:20,代碼來源:BwCoreServiceProvider.php


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