承接 smtgr14/twig-debugbar 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

smtgr14/twig-debugbar

Composer 安装命令:

composer require smtgr14/twig-debugbar

包简介

A Twig extension to provide access to PHP Debug Bar's rendering functions.

README 文档

README

A simple Twig extension to provide rendering functions for the PHP Debug Bar. This extension loads the StandardDebugBar and provides the functions dbg_message, dbg_renderHead, and dbg_render for Twig.

Requirements:

Installation

composer require smtgr14/twig-debugbar

Example

$twig = new Twig_Environment(new Twig_Loader_Filesystem('Views'));
$debugbarExtn = $debugbarExtn = new Dougfelton\TwigDebugBar\Extension('/Path'); // Relative assets path to your web directory e.g. /assets/debug/
$twig->addExtension($debugbarExtn);

$debugbar = $debugbarExtn->getDebugBar(); // Returns DebugBar for use with normal debugbar operations.
<html>
	<head>
		{{ dbg_renderHead() }}
	</head>
	<body>
        <!-- array dump -->
        {{ dbg_message(array)|raw }}
        <!-- labeled message -->
        {{ dbg_message('Something Wrong', 'error')|raw }}
		{{ dbg_render()|raw }}
	</body>
</html>

Acknowledgement

This extension is a minor update (for compatibility with Twig v2) of Mark Arneman's extension found here and the changes made by Doug Felton.
My work was minimal, and if you find this extension useful the credit goes to Mark and Doug. All I added was the getDebugBar method to return the object to make the bar useful outside of just the template rendering and message methods.

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-03-09

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固