marc1706/phpbb-text-shortener
Composer 安装命令:
composer require marc1706/phpbb-text-shortener
包简介
Library for shortening post text in phpBB 3.2.x
README 文档
README
About
phpbb-text-shortener is a PHP library for shortening post text in phpBB 3.3.x to a specified length.
Requirements
PHP 7.1.3 or newer is required for this library to work.
Installation
It is recommend to install the library using composer. Just add the following snippet to your composer.json:
"require": {
"marc1706/phpbb-text-shortener": "~0.2"
},
Usage
Create an instance of text shortener:
$shortener = new \Marc1706\TextShortener\Shortener();
Grab the database representation of a post from the database and pass it to the shortener (e.g. to a length of 200 characters):
$shortener->setText($postText)
->shortenText(200);
Automated Tests
The library is being tested using unit tests to prevent possible issues.
License
统计信息
- 总下载量: 1.17k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-01-10