ashleydawson/slugify 问题修复 & 功能扩展

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

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

ashleydawson/slugify

最新稳定版本:1.0.1

Composer 安装命令:

composer require ashleydawson/slugify

包简介

Lightweight slugify library

README 文档

README

Build Status

Installation

You can install Slugify via Composer. To do that, simply require the package in your composer.json file like so:

{
    "require": {
        "ashleydawson/slugify": "~1.0"
    }
}

Then run composer update to install the package.

Basic Usage

Using slugify is easy - simply instantiate the slugifier service class and call the slugify method:

require_once __DIR__ . '/vendor/autoload.php';

use AshleyDawson\Slugify\Slugifier;

$slugifier = new Slugifier();

$text = $slugifier->slugify('Hello World');

// The value of $text will be "hello-world"
echo $text;

If you'd like to change the delimiter used, simply pass it as the second argument to the slugify method:

require_once __DIR__ . '/vendor/autoload.php';

use AshleyDawson\Slugify\Slugifier;

$slugifier = new Slugifier();

$text = $slugifier->slugify('Hello World', '_');

// The value of $text will be "hello_world"
echo $text;

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-08-12