geosub/yii-slugifier

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

1.1 2015-09-21 08:38 UTC

This package is not auto-updated.

Last update: 2024-11-09 18:11:47 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("Прове р каСл агифа^^ера");