定制 stoffel/console-sourcecode 二次开发

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

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

stoffel/console-sourcecode

Composer 安装命令:

composer require stoffel/console-sourcecode

包简介

Helper to render source code using Symfony Console Component

README 文档

README

Helper to render source code using Symfony Console Component.

Example

$ git clone git@github.com:chr-hertel/console-sourcecode.git
$ cd console-image
$ composer install
$ example/php-code
$ example/php-file

Installation

$ composer require stoffel/console-sourcecode

Usage in PHP

use Stoffel\Console\SourceCode\SourceCodeHelper;

// print code from variable
SourceCodeHelper::create($output)
    ->write($code);

// print code from file
SourceCodeHelper::create($output)
    ->writeFile('/path/to/source-file.php');

// print only an excerpt
SourceCodeHelper::create($output)
    ->writeFile('/path/to/source-file.php', 59, 17);

// chose one of the predefined themes
SourceCodeHelper::create($output)
    ->useTheme('seti')
    ->writeFile('/path/to/source-file.php');

// disable line numbers
SourceCodeHelper::create($output)
    ->disableLineNumbers()
    ->writeFile('/path/to/source-file.php');

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-10-19

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固