当前位置: 首页>>代码示例>>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;未经允许,请勿转载。