The SSH host key has changed on 8 April, 2022 to this one: SHA256:573uTBSeh74kvOo0HJXi5ijdzRm8me27suzNEDlGyrQ
blueroses.hu project repository
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

33 lines
485 B

<?php
namespace KekRozsak\FrontBundle\Extensions;
class Slugifier
{
/**
* Slugify string
*
* @param string $text
* @return string
*/
public function slugify($text)
{
$text = trim(preg_replace('~[^\\pL\d]+~u', '-', $text));
if (function_exists('iconv'))
{
$text = iconv('utf-8', 'us-ascii//TRANSLIT', $text);
}
$text = strtolower($text);
$text = preg_replace('~[^-\w]+~', '', $text);
if (empty($text))
{
$text = 'n-a';
}
return $text;
}
}