Search by

geosub / yii-slugifier

geosub

There is no license information available for the latest version (1.1) of this package.

Yii Extension to translate unsave string to save for url and filename

Package info

github.com/geosub/yii-slugifier

pkg:composer/geosub/yii-slugifier

Statistics

Installs: 12

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.1 2015-09-21 08:38 UTC

This package is not auto-updated.

Last update: 2026-09-13 03:43:42 UTC


README

Translate unsafe string to save for URL and FILENAME

Requirements

  • Yii 1.1.x or above
  • PHP 5.4 or above
  • php5-intl extention

Install

  • config/main.php
	'components' => [
		'slug' => [
            'class' => 'path.to.ESligifier',
		],
	],

or

  • config/main.php
	'components' => [
		'slug' => [
            'class' => 'path.to.ESligifier',
			'rules'     => "Any-Latin; NFD; [\\u0100-\\u7fff] remove; [:Nonspacing Mark:] Remove; NFC; [:Punctuation:] Remove; Lower();",
			'delimiter' => "-",
		],
	],

Usage

echo Yii::app()->slug->getSlug("Прове р каСл агифа^^ера");