定制 php-console/silex-service-provider 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

php-console/silex-service-provider

Composer 安装命令:

composer require php-console/silex-service-provider

包简介

Silex service provider to handle PHP errors, dump variables, execute PHP code remotely in Google Chrome

README 文档

README

PHP Console allows you to handle PHP errors & exceptions, dump variables, execute PHP code remotely and many other things using Google Chrome extension PHP Console and PhpConsole server library.

This packages integrates PHP Console server library with Silex as configurable service provider.

Installation

  1. Install Google Chrome extension PHP Console.
  2. Add "php-console/silex-service-provider": "1.*" package in Silex project composer.json and run composer update.

Configuration

To handle errors occurred on Silex initialization PhpConsole service provider should be initialized right after Silex\Application:

$app = new Silex\Application();

// All settings are optional, so you can remove any key in this array
$app['php-console.settings'] = array(
  'sourcesBasePath' => dirname(__DIR__),
  'serverEncoding' => null,
  'headersLimit' => null,
  'password' => null,
  'enableSslOnlyMode' => false,
  'ipMasks' => array(),
  'isEvalEnabled' => false,
  'dumperLevelLimit' => 5,
  'dumperItemsCountLimit' => 100,
  'dumperItemSizeLimit' => 5000,
  'dumperDumpSizeLimit' => 500000,
  'dumperDetectCallbacks' => true,
  'detectDumpTraceAndSource' => false,
);

$app->register(new PhpConsole\Silex\ServiceProvider($app,
new \PhpConsole\Storage\File(sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'php-console.data') // any writable path
));

See PhpConsole\Silex\ServiceProvider for detailed settings description.

Usage

When PhpConsole service provider is registered all errors and exceptions will be handled automatically.

Now you can debug vars using PhpConsole global helper class PC:

PC::debug($var, 'tags');

Also you can extended Silex\Application class with use PhpConsole\Silex\ApplicationHelperTrait and debug using:

$app->pc($var, 'tags');

统计信息

  • 总下载量: 42.87k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 9
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 6
  • Watchers: 2
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: BSD
  • 更新时间: 2014-02-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固