hsynlms/url-record 问题修复 & 功能扩展

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

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

hsynlms/url-record

最新稳定版本:v1.0.2

Composer 安装命令:

composer require hsynlms/url-record

包简介

a simple slug generator

README 文档

README

A simple slug generator. It's a PHP port from nopCommerce UrlRecord service.

Why php-url-record?

The reason behind this repository is nopCommerce, is an open source ASP.NET Core based ecommerce solution. I just wanted to create a port of the nopCommerce SEO friendly slug generation service which is in production for years and trusted by tens of thousands of stores.

Install

$ composer require hsynlms/url-record

Usage

use hsynlms\UrlRecord;

$slugGenerator = new UrlRecord();
echo $slugGenerator->GetSeoFriendlyName('nobodY d0es_it better');
// will return -> nobody-d0es_it-better

Options

Name Type Default Description
name string - The string that will be slugified
convertNonWesternChars boolean true A value indicating whether non western chars should be converted
allowUnicodeCharsInUrls boolean false A value indicating whether Unicode chars are allowed

Compatibility

PHP 7 >= 7.4.0 required due to use of built-in mb_str_split function.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-02-22