定制 scabbiafw/scabbia2-formatters 二次开发

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

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

scabbiafw/scabbia2-formatters

最新稳定版本:v0.1.1

Composer 安装命令:

composer require scabbiafw/scabbia2-formatters

包简介

Scabbia2 Formatters Component

README 文档

README

This component is a simple abstraction layer which helps scabbia2 to generate output in various formats such as Html, Console and etc. New formatters can be derived by implementing Scabbia\Formatters\FormatterInterface interface.

Build Status Scrutinizer Code Quality Total Downloads Latest Stable Version Latest Unstable Version Documentation Status

Usage

Formatters

use Scabbia\Formatters\ConsoleFormatter;
use Scabbia\Formatters\HtmlFormatter;

if (PHP_SAPI === "cli") {
    $formatter = new ConsoleFormatter();
} else {
    $formatter = new HtmlFormatter();
}

$formatter->writeHeader(2, 'Heading');
$formatter->writeColor('red', 'important text');
$formatter->write('normal text');
$formatter->writeArray(['array', 'output']);

Auto-selecting Formatter

use Scabbia\Formatters\Formatters;

$formatter = Formatters::getCurrent();

$formatter->write('an adaptive output');

Links

Contributing

It is publicly open for any contribution. Bugfixes, new features and extra modules are welcome. All contributions should be filed on the eserozvataf/scabbia2-formatters repository.

  • To contribute to code: Fork the repo, push your changes to your fork, and submit a pull request.
  • To report a bug: If something does not work, please report it using GitHub issues.
  • To support: Donate

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2015-09-15