Example #1
0
 protected function proccess($uri, $title)
 {
     if (empty($uri)) {
         $output = $title;
     } else {
         $output = $uri;
     }
     $output = Alias::translit($output);
     $output = preg_replace('/[^A-Za-z0-9_\\-]/', '', $output);
     /// Always replace whitespace with the separator.
     $output = preg_replace('/(\\s|quot)+/', '-', $output);
     $output = mb_strToLower($output);
     $output = strToLower($output);
     //         $output = trim ($output, '-');
     return Alias::sanitize($output);
 }