grandt/phplipsum 问题修复 & 功能扩展

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

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

grandt/phplipsum

最新稳定版本:1.2.1

Composer 安装命令:

composer require grandt/phplipsum

包简介

LipsumGenerator can be used to create garbeled, non repetitive 'chapters' using the standard Lorem Ipsum text as a basis. It'll try to generate reasonable well looking paragraphs in the chapters.

README 文档

README

Create garbled, non repetitive "chapters" using the standard Lorem Ipsum text as a basis.

License

LGPL 2.1

Guide

The intention is to help debug or test text input, by being quickly able to generate vast amounts of non predictable text.

The user can set the source text to something different than the original Latin Lorem text, if desired.

To use the class, simply call generate with these parameters, all of which are optional:

  • $minWordCount (integer) Default: 200.
  • $maxWordCount (integer) Default: 2000.
  • $useMultipleParagraphs (boolean) Generate a text with multiple paragraphs. Default: TRUE.
  • $startWithLorem (boolean) Will start each chapter with the text "Lorem ipsum dolor sit amet, consectetur adipisicing elit.", the length of which is subtracted from the $minWordCount. Used to help identify the place holder text for what it really is. Default: TRUE.
  • $indent (String) Indentation of each new paragraph in the generated text. Default: " " (two spaces).
  • $eol (String) End of line sequence. Default: The Windows new line sequence ("\r\n").

generateHTML is a convenience method, identical to generate, but where $indent="<p>" and $eol="</p>\r\n".

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: LGPL-2.1
  • 更新时间: 2015-11-01