transactpro/phalcon-debug-widget 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

transactpro/phalcon-debug-widget

Composer 安装命令:

composer require transactpro/phalcon-debug-widget

包简介

Very simple to install Debug Toolbar Widget for Phalcon framework.

README 文档

README

SensioLabsInsight

Latest Stable Version Total Downloads

Note (How it works):

The debug widget for now is very simplistic and more of a proof-of-concept. It expects you have three services in your dependency injector named "db", "dispatcher" and "view" and that they correspond to those services. When you pass the DI to Phalcon Debug Widget It looks for those specific services and:

  • sets them as shared services
  • sets the eventManager for them
  • Attaches itself to those events

This means passing the DI to the debug widget will alter those services. Generally speaking, a shared db, dispatcher, and view is fine. If you have ideas for other ways to hook in, please open an issue for discussion.

The Phalcon Debug Widget is designed to make development easier by displaying debugging information directly in your browser window. Currently it displays php globals such as $_SESSION as well as outputing resource usage and database queries and connection information. It includes syntax highlighting via Prismjs.com.

If it looks familiar, its because its modeled after the Yii debug toolbar

Installation

"require": {
	"transactpro/phalcon-debug-widget": "~1.0"
}

Usage and Configuration

Define a debug or environment flag in your main index.php (or config.php) file so you can easily disable the Phalcon Debug Widget on production environments. Example:

defined('PHALCONDEBUG') || define('PHALCONDEBUG', true);

Add these lines to your index.php file before you handle application.

if (PHALCONDEBUG) {
	$debugWidget = new \PDW\DebugWidget($di);
}

echo $application->handle()->getContent();

Or you can specify your custom list of providers and panels:

if (PHALCONDEBUG) {
    $debugWidget = new \PDW\DebugWidget($di, [
        'db'          => ['db'],
        'dispatch'    => ['dispatcher'],
        'view'        => ['view'],
        'apiProvider' => ['apiProvider']
    ], [
        'server',
        'request',
        'views',
        'db',
        'api'
    ]);
}

echo $application->handle()->getContent();

Preview

Server

Request

Views

Database

Api calls

Attribution:

Bug Icon designed by Nithin Viswanathan from the Noun Project

JQuery Syntax Highlighting implemented with Prismjs.com

transactpro/phalcon-debug-widget 适用场景与选型建议

transactpro/phalcon-debug-widget 是一款 基于 HTML 开发的 Composer 扩展包,目前已累计 4.21k 次下载、GitHub Stars 达 2, 最近一次更新时间为 2015 年 07 月 09 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 transactpro/phalcon-debug-widget 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 transactpro/phalcon-debug-widget 我们能提供哪些服务?
定制开发 / 二次开发

基于 transactpro/phalcon-debug-widget 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

  • Stars: 2
  • Watchers: 3
  • Forks: 21
  • 开发语言: HTML

其他信息

  • 授权协议: Unknown
  • 更新时间: 2015-07-09