Class Slug
Slug Library
Nothing but legless, boneless creatures who are responsible for creating
magic "friendly urls" in your CodeIgniter application. Slugs are nocturnal
feeders, hiding during daylight hours.
Methods summary
public
|
#
__construct( array $config = array() )
Setup all vars
Parameters
|
public
|
#
set_config( array $config = array() )
Manually Set Config
Pass an array of config vars to override previous setup
Parameters
|
public
string
|
#
create_uri( string $title = '', $field = 'uri' )
Create a uri string
This wraps into the _check_uri method to take a character
string and convert into ascii characters.
Parameters
Returns
string
Uses
Slug::_check_uri()
Slug::create_slug()
|
public
string
|
#
create_slug( string $string, string $replacement,… )
Create Slug
Returns a string with all spaces converted to underscores (by default), accented
characters converted to non-accented characters, and non word characters removed.
Parameters
- $string
- the string you want to slug
- $replacement,…
- will replace keys in map
Returns
string
|
Properties summary
public
string
|
$table
|
|
public
string
|
$id
The primary id field in the table
The primary id field in the table
|
|
public
string
|
$replacement
The replacement (Either underscore or dash)
The replacement (Either underscore or dash)
|
|