定制 dcsg/stringy-template 二次开发

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

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

dcsg/stringy-template

Composer 安装命令:

composer require dcsg/stringy-template

包简介

Stringy and String Template together

README 文档

README

Minimum PHP Version Latest Stable Version License Build Status StyleCI SymfonyInsight Quality Gate Status Coverage Vulnerabilities Bugs Security Rating Total Downloads

This Library provides a unified S Class that "glues" two amazing libraries. It integrates the Stringy library created by Daniel St. Jules and the StringTemplate Library create by Nicolò Martini. The Stringy Library is a string manipulation library, while the String Template is an engine to render string templates.

This Library was created because in my projects I've been using both libraries and always ended up in having them integrated into a single class to make it's usage simpler.

Install

Via Composer

$ composer require dcsg/stringy-template

Usage

For the full list of features of Stringy see it's documentation, for more details on the String Template you can also check their documentation.

echo S::render(
    'Hello, my name is {firstName} {lastName}.',
    ['firstName' => 'Daniel', 'lastName' => 'Gomes']
); 
// "Hello, my name is Daniel Gomes."


// Using conversion specifications from `sprintf`
echo S::render(
    'I have {num%.1f} {fruit}.',
    ['num' => 1.5345, 'fruit' => 'oranges']
);
// "I have 1.5 oranges."

echo S::join(['one', 'two', 'three'], ', ');
// "one, two, three"

Change log

Please see CHANGELOG for more information on what has changed recently.

Testing

$ composer test

Contributing

Please see CONTRIBUTING and CODE OF CONDUCT for details.

Security

If you discover any security related issues, please email hi@dcsg.me instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-03-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固