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


PHP Debugbar::disable方法代码示例

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


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

示例1: upload

 /**
  * Method for upload files
  *
  * @param Request $request
  * @param MediaRepositoryInterface $repositoryInterface
  * @return string
  */
 public function upload(Request $request, MediaRepositoryInterface $repositoryInterface)
 {
     \Debugbar::disable();
     $id = $repositoryInterface->create($request->file('file'), null, null);
     $answer = array('answer' => 'File transfer completed', 'id' => $id);
     $json = json_encode($answer);
     return $json;
 }
开发者ID:jonioliveira,项目名称:prototype2015,代码行数:15,代码来源:UploadController.php

示例2: getTemplate

 public function getTemplate()
 {
     \Debugbar::disable();
     if (\App::environment() != 'prod') {
         $content = \File::get(base_path() . '/angular/app/views/modules' . \Input::get('tmp'));
     } else {
         $content = \File::get(base_path() . '/public/app/views/modules' . \Input::get('tmp'));
     }
     $response = \Response::make($content);
     return $response;
 }
开发者ID:rbmowatt,项目名称:alohalbi.surf,代码行数:11,代码来源:AngularResourceController.php

示例3: handle

 /**
  * Execute the command.
  *
  * @return void
  */
 public function handle()
 {
     \Debugbar::disable();
     //Get a list of allDuo Users subscribed to the DuoRegisteredUsersReport
     $users = User::whereHas('reports', function ($query) {
         $query->where('name', 'DuoRegisteredUsersReport');
     })->get();
     //Loop each user to generate report
     foreach ($users as $recipient) {
         $this->dispatch(new GenerateRegisteredDuoUsersReport($recipient));
         //            \Log::debug('Message will be sent to:',[$recipient->email]);
     }
 }
开发者ID:sloan58,项目名称:uc-insight-esk,代码行数:18,代码来源:GenerateRegisteredDuoUsersReportCommand.php

示例4: countdown

 public function countdown()
 {
     $api_uri = 'http://icampus.faithpromise.org/api/v1/events/current';
     $key = 'icampus_countdown';
     $is_local = App::environment('local');
     if ($is_local) {
         \Debugbar::disable();
         $test_start = Carbon::now();
         $test_start_local = $test_start->copy()->setTimezone('America/New_York');
         $human_start_time_format = $test_start->minute == 0 ? 'ga' : 'g:ia';
         $human_start_format = 'D ' . $human_start_time_format;
         $test = ['start_utc' => $test_start->timestamp * 1000, 'start' => $test_start_local->timestamp * 1000, 'is_live' => false, "human_start" => $test_start_local->format($human_start_format), "human_start_time" => $test_start_local->format($human_start_time_format)];
         return response(json_encode($test));
     }
     // LATER: Test out the cache
     $countdown = Cache::get($key);
     $http_client = new HttpClient();
     if ($countdown === null or App::environment('local')) {
         $countdown = [];
         $icampus_result = $http_client->get($api_uri, ['connect_timeout' => 5]);
         try {
             $data = json_decode($icampus_result->getBody());
             if ($icampus_result->getStatusCode() !== 200 or !isset($data->meta->status) or $data->meta->status !== 200) {
                 //  LATER: Log this
                 throw new \Exception('Call to iCampus API was not successful');
             }
         } catch (\Exception $e) {
             $expire = Carbon::now()->addMinutes(5);
             return response('', 500)->header('Expires', $expire);
         }
         $countdown['start_utc'] = Carbon::parse($data->response->item->eventStartTime);
         $countdown['start_local'] = $countdown['start_utc']->copy()->setTimezone('America/New_York');
         $countdown['expire_utc'] = $countdown['start_utc']->copy()->addMinutes(60);
         $human_start_time_format = $countdown['start_local']->minute == 0 ? 'ga' : 'g:ia';
         $human_start_format = 'D ' . $human_start_time_format;
         $countdown['json'] = json_encode(array("start_utc" => $countdown['start_utc']->timestamp * 1000, "start" => $countdown['start_local']->timestamp * 1000, "is_live" => $data->response->item->isLive, "human_start" => $countdown['start_local']->format($human_start_format), "human_start_time" => $countdown['start_local']->format($human_start_time_format)));
         Cache::put($key, $countdown, $countdown['expire_utc']);
     }
     return response($countdown['json'])->header('Expires', $countdown['expire_utc']->format('D, d M Y H:i:s \\G\\M\\T'));
 }
开发者ID:mcculley1108,项目名称:faithpromise.org,代码行数:40,代码来源:InternetCampusController.php

示例5: index

 public function index()
 {
     if (class_exists('\\Debugbar')) {
         \Debugbar::disable();
     }
     switch ($this->getMethod()) {
         case static::MethodPost:
             $this->parameters = $_POST;
             break;
         case static::MethodGet:
             $this->parameters = $_GET;
             break;
         default:
             $this->parameters = Input::all();
     }
     if ($this->check()) {
         $this->beforeHandle();
         if (!$this->cache) {
             $this->cache = new BasicAPICacher();
         }
         if ($cache = $this->cache->read($this)) {
             $this->response = $cache;
             $this->debugMessage('缓存命中');
         } else {
             $this->handle();
             $this->cache->save($this);
         }
         $this->afterHandle();
     } else {
         $this->debugMessage('验证check()函数没有通过');
     }
     return $this->response();
 }
开发者ID:xjtuwangke,项目名称:laravel-api,代码行数:33,代码来源:BasicAPIController.php

示例6: function

<?php

\Debugbar::disable();
Route::get("buscar", "InfoInvestController@getIndex");
Route::get("test1", function () {
    return view("index");
});
Route::get("test2", function () {
    return view("form");
});
Route::get("redirecionar", function () {
    if (\Input::get('url') != null) {
        echo "Decidir o que fazer o acesso para " . \Input::get('url');
        sleep(1);
        return redirect(\Input::get('url'));
    } else {
        return array('erro' => true, 'message' => "Url inválida!");
    }
});
开发者ID:mariosas,项目名称:infoInvest,代码行数:19,代码来源:routes.php

示例7: tryThisOne

 public function tryThisOne()
 {
     \Debugbar::disable();
     $location = (array) App\Location::random();
     return view('locations.try-this', ['location' => $location]);
 }
开发者ID:pjsinco,项目名称:lookup,代码行数:6,代码来源:LocationsController.php

示例8: getFilealbum

 public function getFilealbum($parentId = null)
 {
     \Debugbar::disable();
     $fileResult = $this->foldercontents($parentId);
     if (!$fileResult['status']) {
         Message::error($fileResult['message']);
     }
     $maxSize = Filer::getMaxSizeAllowed() > Filer::getMaxSizePossible() ? Filer::getMaxSizePossible() : Filer::getMaxSizeAllowed();
     // Convert bytes to mega
     $maxSize = $maxSize / 1048576;
     return $this->layout()->with('parentId', $parentId)->with('fileResult', $fileResult)->with('uploadMaxFilesize', $maxSize);
 }
开发者ID:sharenjoy,项目名称:cmsharenjoy,代码行数:12,代码来源:FilerController.php

示例9: exportAssetReport

 /**
  * Exports the assets to CSV
  *
  * @author [A. Gianotto] [<snipe@snipe.net>]
  * @since [v1.0]
  * @return \Illuminate\Http\Response
  */
 public function exportAssetReport()
 {
     \Debugbar::disable();
     $response = new StreamedResponse(function () {
         // Open output stream
         $handle = fopen('php://output', 'w');
         Asset::with('assigneduser', 'assetloc', 'defaultLoc', 'assigneduser.userloc', 'model', 'supplier', 'assetstatus', 'model.manufacturer')->orderBy('created_at', 'DESC')->chunk(500, function ($assets) use($handle) {
             fputcsv($handle, [trans('admin/hardware/table.asset_tag'), trans('admin/hardware/form.manufacturer'), trans('admin/hardware/form.model'), trans('general.model_no'), trans('general.name'), trans('admin/hardware/table.serial'), trans('general.status'), trans('admin/hardware/table.purchase_date'), trans('admin/hardware/table.purchase_cost'), trans('admin/hardware/form.order'), trans('admin/hardware/form.supplier'), trans('admin/hardware/table.checkoutto'), trans('admin/hardware/table.location'), trans('general.notes')]);
             foreach ($assets as $asset) {
                 // Add a new row with data
                 fputcsv($handle, [$asset->asset_tag, $asset->model->manufacturer ? $asset->model->manufacturer->name : '', $asset->model ? $asset->model->name : '', $asset->model->modelno ? $asset->model->modelno : '', $asset->name ? $asset->name : '', $asset->serial ? $asset->serial : '', $asset->assetstatus ? e($asset->assetstatus->name) : '', $asset->purchase_date ? e($asset->purchase_date) : '', $asset->purchase_cost > 0 ? Helper::formatCurrencyOutput($asset->purchase_cost) : '', $asset->order_number ? e($asset->order_number) : '', $asset->supplier ? e($asset->supplier->name) : '', $asset->assigneduser ? e($asset->assigneduser->fullName()) : '', $asset->assigneduser && $asset->assigneduser->userloc != '' ? e($asset->assigneduser->userloc->name) : ($asset->defaultLoc != '' ? e($asset->defaultLoc->name) : ''), $asset->notes ? e($asset->notes) : '']);
             }
         });
         // Close the output stream
         fclose($handle);
     }, 200, ['Content-Type' => 'text/csv', 'Content-Disposition' => 'attachment; filename="assets-' . date('Y-m-d-his') . '.csv"']);
     return $response;
 }
开发者ID:stijni,项目名称:snipe-it,代码行数:25,代码来源:ReportsController.php

示例10: __construct

 public function __construct()
 {
     $this->middleware('auth');
     \Debugbar::disable();
 }
开发者ID:avinaszh,项目名称:callcenter,代码行数:5,代码来源:TypicalDescriptionController.php

示例11: changePassword

 public function changePassword(Request $request)
 {
     \Debugbar::disable();
     $user = auth()->guard('api')->user();
     if (!Hash::check($request->get('old_password'), $user->password)) {
         return 1;
     }
     if ($user->update(['password' => Hash::make($request->get('password'))])) {
         return 2;
     }
     return 0;
 }
开发者ID:sopoisun,项目名称:narotser-hadni-kodnop,代码行数:12,代码来源:ApiController.php

示例12: render

 /**
  * Render an exception into an HTTP response.
  *
  * @param  \Illuminate\Http\Request $request
  * @param  \Exception $e
  * @return \Illuminate\Http\Response
  */
 public function render($request, Exception $e)
 {
     env('APP_DEBUG') ? \Debugbar::enable() : \Debugbar::disable();
     return parent::render($request, $e);
 }
开发者ID:filipepaladino,项目名称:base-admin,代码行数:12,代码来源:Handler.php

示例13: __construct

 public function __construct()
 {
     parent::__construct();
     \Debugbar::disable();
 }
开发者ID:undownding,项目名称:cnBeta1,代码行数:5,代码来源:APIController.php

示例14: withinDistance

 /**
  * Calcuate the number of physicians within a certain number of 
  * miles of a ZIP code.
  *
  * @param string
  * @return string
  */
 public function withinDistance(Request $request)
 {
     \Debugbar::disable();
     if (!$request->has(['miles', 'zip'])) {
         app()->abort(404);
     }
     $location = Location::where('zip', '=', $request->zip)->get();
     $lat = $location[0]->lat;
     $lon = $location[0]->lon;
     $haversineSelectStmt = $this->haversineSelect($lat, $lon);
     $physicians = DB::table('physicians')->select(DB::raw($haversineSelectStmt))->having('distance', '<', $request->miles)->orderBy('distance', 'asc')->get();
     $count = (string) count($physicians);
     return json_encode(['count' => $count]);
 }
开发者ID:pjsinco,项目名称:lookup,代码行数:21,代码来源:PhysiciansController.php


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