ppito/zf3-whoops
最新稳定版本:1.3.2
Composer 安装命令:
composer require ppito/zf3-whoops
包简介
ZF3-Whoops, integrated whoops in ZF3 Framework
README 文档
README
whoops is an error handler base/framework for PHP. Out-of-the-box, it provides a pretty error interface that helps you debug your web projects, but at heart it's a simple yet powerful stacked error handling system.
Table of Contents
Module installation
-
cd my/project/directory -
create a
composer.jsonfile with following contents:{ "require": { "ppito/zf3-whoops": "^1.3" } } -
install composer via
curl -s http://getcomposer.org/installer | php(on windows, download http://getcomposer.org/installer and execute it with PHP) -
run
php composer.phar install -
open
my/project/directory/configs/modules.config.phpand add the following key :'WhoopsErrorHandler', // must be added as the first module -
optional : copy
config/module.config.phpinmy/project/directory/config/autoload/zf3-whoops.local.php -
optional : edit
my/project/directory/config/autoload/zf3-whoops.local.php
Features
Render View Manager - Twig Support
(zf3-whoops >= 1.2.0)
By default this module use the simple php render, but you can now specify your favorite render.
Usage :
Twig render has been supported, you just need to change the template_render configuration:
'template_render' => 'zf3_whoops/twig_error',
Module Visibility Manager
(zf3-whoops >= 1.3.0)
It is now possible to manage the module loading by implement your own rules. For example, the module can be loaded only for the admin users or only for dev&preprod environments.
Usage :
- Create your own class by implement the interface VisibilityServiceInterface (or the abstract VisibilityServiceAbstract)
- @see example VisibilityService.visibility-example.php.
- Change the
visibility_service_nameconfiguration to specify the name of your class.- @see example module.config.visibility-example.php.
'visibility_service_name' => Application\Service\VisibilityService::class,
License
ppito/zf3-whoops is licensed under the MIT License - See the LICENSE file for details.
统计信息
- 总下载量: 71.47k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 13
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-11-13