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


PHP Debugbar\LaravelDebugbar类代码示例

本文整理汇总了PHP中Barryvdh\Debugbar\LaravelDebugbar的典型用法代码示例。如果您正苦于以下问题:PHP LaravelDebugbar类的具体用法?PHP LaravelDebugbar怎么用?PHP LaravelDebugbar使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: boot

 public function boot(LaravelDebugbar $debugBar, EventDispatcher $eventDispatcher, ViewComposerCollector $viewComposerCollector)
 {
     $eventDispatcher->listen("creating: *", function (View $view) use($viewComposerCollector, $eventDispatcher) {
         foreach ($this->findApplicableComposers($view, $eventDispatcher) as $composer) {
             $viewComposerCollector->addViewComposer($view, $composer);
         }
     });
     $debugBar->addCollector($viewComposerCollector);
 }
开发者ID:joshbrw,项目名称:laravel-debugbar-viewcomposers,代码行数:9,代码来源:ServiceProvider.php

示例2: register

 /**
  * Register the service provider.
  *
  * @return void
  */
 public function register()
 {
     $configPath = __DIR__ . '/../config/debugbar.php';
     $this->mergeConfigFrom($configPath, 'debugbar');
     $this->app->alias('DebugBar\\DataFormatter\\DataFormatter', 'DebugBar\\DataFormatter\\DataFormatterInterface');
     $this->app->singleton('debugbar', function ($app) {
         $debugbar = new LaravelDebugbar($app);
         $sessionManager = $app['session'];
         $httpDriver = new SymfonyHttpDriver($sessionManager);
         $debugbar->setHttpDriver($httpDriver);
         return $debugbar;
     });
     $this->app->alias('debugbar', 'Barryvdh\\Debugbar\\LaravelDebugbar');
     $this->app['command.debugbar.clear'] = $this->app->share(function ($app) {
         return new Console\ClearCommand($app['debugbar']);
     });
     $this->commands(array('command.debugbar.clear'));
 }
开发者ID:crstestacc,项目名称:laravel-debugbar,代码行数:23,代码来源:ServiceProvider.php

示例3: offsetUnset

 /**
  * 
  *
  * @static 
  */
 public static function offsetUnset($key)
 {
     //Method inherited from \DebugBar\DebugBar
     return \Barryvdh\Debugbar\LaravelDebugbar::offsetUnset($key);
 }
开发者ID:tvad911,项目名称:biquyetmuasam.com,代码行数:10,代码来源:_ide_helper.php

示例4: debug

 /**
  * Based on Twig_Extension_Debug / twig_var_dump
  * (c) 2011 Fabien Potencier
  *
  * @param Twig_Environment $env
  * @param $context
  */
 public function debug(Twig_Environment $env, $context)
 {
     if (!$env->isDebug() || !$this->debugbar) {
         return;
     }
     $count = func_num_args();
     if (2 === $count) {
         $data = [];
         foreach ($context as $key => $value) {
             if (is_object($value)) {
                 if (method_exists($value, 'toArray')) {
                     $data[$key] = $value->toArray();
                 } else {
                     $data[$key] = "Object (" . get_class($value) . ")";
                 }
             } else {
                 $data[$key] = $value;
             }
         }
         $this->debugbar->addMessage($data);
     } else {
         for ($i = 2; $i < $count; $i++) {
             $this->debugbar->addMessage(func_get_arg($i));
         }
     }
     return;
 }
开发者ID:barryvdh,项目名称:laravel-debugbar,代码行数:34,代码来源:Debug.php

示例5: register

 /**
  * @param EntityManagerInterface $em
  * @param Configuration          $configuration
  */
 public function register(EntityManagerInterface $em, Configuration $configuration)
 {
     if ($this->debugbar->hasCollector('doctrine')) {
         $debugStack = $this->debugbar->getCollector('doctrine')->getDebugStack();
     } else {
         $debugStack = new DebugStack();
         $this->debugbar->addCollector(new DoctrineCollector($debugStack));
     }
     $configuration->setSQLLogger($debugStack);
 }
开发者ID:Devitek,项目名称:orm,代码行数:14,代码来源:LaravelDebugbarLogger.php

示例6: handle

 /**
  * Handle an incoming request.
  *
  * @param  Request  $request
  * @param  Closure  $next
  * @return mixed
  */
 public function handle($request, Closure $next)
 {
     try {
         /** @var \Illuminate\Http\Response $response */
         $response = $next($request);
     } catch (Exception $e) {
         $response = $this->handleException($request, $e);
     }
     // Modify the response to add the Debugbar
     $this->debugbar->modifyResponse($request, $response);
     return $response;
 }
开发者ID:drickferreira,项目名称:rastreador,代码行数:19,代码来源:Debugbar.php

示例7: stopDebugMeasure

 /**
  * @param string $name
  */
 protected function stopDebugMeasure($name)
 {
     if ($this->debugBar) {
         $this->debugBar->stopMeasure($name);
     }
 }
开发者ID:violetbrick,项目名称:core,代码行数:9,代码来源:DebugTrait.php


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