liderman/php-text-generator 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

liderman/php-text-generator

最新稳定版本:v1.0.0

Composer 安装命令:

composer require liderman/php-text-generator

包简介

Fast SEO text generator on a mask

README 文档

README

Fast SEO text generator on a mask.

Written in PHP. I do not use regular expressions and the fastest. I covered tests and simple! Supporting recursive text generation rules. It supports multiple encodings.

This package implements the functionality of a similar package for Go Lang – text-generator.

Build Status Latest Stable Version Total Downloads Latest Unstable Version License

Installation

composer require liderman/php-text-generator

Usage

An example of a simple template text generation:

$textGen = new TextGenerator();
echo $textGen->generate("Good {morning|day}!");
// Displays: Good morning!
// or
// Good day!

An example of a complex generation template text:

$textGen = new TextGenerator();
echo $textGen->generate("{Good {morning|evening|day}|Goodnight|Hello}, {friend|brother}! {How are you|What's new with you}?");
// Displays: Good morning, friend! How are you?
// or
// Good day, brother! What's new with you?
// or
// Hello, friend! How are you?
// ...

Features

  • It supports multiple encodings
  • Supporting recursive text generation rules
  • Fast! Does not use regular expressions
  • Easy wrapping thanks to the integrated interface
  • Covered tests
  • Written by PSR standards and 100% covered with documentation (PHP-Doc)
  • Without external dependencies
  • The code is checked by the static analyzer PhpStan lvl 7

Requirements

  • PHP >= 7.1

统计信息

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

GitHub 信息

  • Stars: 26
  • Watchers: 2
  • Forks: 8
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-12-11