-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhelpers.php
More file actions
34 lines (31 loc) · 989 Bytes
/
helpers.php
File metadata and controls
34 lines (31 loc) · 989 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
/*
* This file is part of the Icybee package.
*
* (c) Olivier Laviale <olivier.laviale@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Icybee\Modules\Nodes;
/**
* Converts a string into a slug.
*
* A slug is the part of a URL which identifies a page using human-readable keywords. It is
* common practice to make the slug all lowercase, accented characters are usually replaced
* by letters from the English alphabet, punctuation marks are generally removed, and long
* page titles may also be truncated to keep the final URL to a reasonable length.
*
* Note: This helper is patchable.
*
* @param string $str The string to convert into a slug.
* @param string $language The language of the string.
*
* @return string
*
* @see http://en.wikipedia.org/wiki/Clean_URL
*/
function slugize($str, $language=null)
{
return Helpers::slugize($str, $language);
}