承接 wernerdweight/canonicalizer 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

wernerdweight/canonicalizer

最新稳定版本:2.0.1

Composer 安装命令:

composer require wernerdweight/canonicalizer

包简介

Simple PHP string canonicalizer

README 文档

README

Simple PHP string canonicalizer

Build Status Latest Stable Version Total Downloads License

Instalation

  1. Download using composer
composer require wernerdweight/canonicalizer
  1. Use in your project
use WernerDweight\Canonicalizer\Canonicalizer;
 
$string = 'This is an interesteing string with some strange cháračtěřš in it. Хорошо?'
$maxLength = 255;   // maximal resulting canonical length (excessive chars will be trimmed)

$canonicalizer = new Canonicalizer($maxLength);
$canonical = $canonicalizer->canonicalize($string);

echo $canonical;    // this-is-an-interesting-string-with-some-strange-characters-in-it-choroso

API

  • canonicalize(string $string[, string $ending[, string $separator]]): string \

    • $string - string to be canonicalized,
    • $ending - string to be appended at the end of canonicalized string (ending is included in $maxLength) - useful to append ids, file formats etc.; default '' (empty string),
    • $separator - string used to separate canonicalized words; default - (dash).
  • setBeforeCallback(?callable): self
    Allows to set a callback function that will be called before the given string is canonicalized.
    The callback should respenct this definition function (string): string.
    Warning: the callback remains in place until explicitly nulled ($canonicalizer->setBeforeCallback(null)).

  • setAfterCallback(?callebld): self Allows to set a callback function that will be called after the given string is canonicalized. The callback should respenct this definition function (string): string. Warning: the callback remains in place until explicitly nulled ($canonicalizer->setAfterCallback(null)).

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-01-27

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固