CAFPE Docs
  • Class

Classes

  • Article_model
  • Articles
  • Auth
  • Auth_controller
  • Bcrypt
  • Hierarchical_controllers
  • Ion_auth
  • Ion_auth_model
  • MY_Controller
  • MY_Lang
  • MY_Model
  • Pages
  • Private_pages
  • Public_controller
  • Seeder
  • Slug
  • User_sessions
  • Users

Functions

  • action_result
  • actions_widget
  • admin_area_buttons
  • base64_current_url_encode
  • base64_url_decode
  • base64_url_encode
  • current_lang
  • jscript_tag
  • lang_switcher
  • logged_in
  • redirect_lang
  • site_url_lang
  • style_tag

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.

Located at Slug.php

Methods summary

public
# __construct( array $config = array() )

Setup all vars

Setup all vars

Parameters

$config
public
# set_config( array $config = array() )

Manually Set Config

Manually Set Config

Pass an array of config vars to override previous setup

Parameters

$config
public string
# create_uri( string $title = '', $field = 'uri' )

Create a uri string

Create a uri string

This wraps into the _check_uri method to take a character string and convert into ascii characters.

Parameters

$title
$field

Returns

string

Uses

Slug::_check_uri()
Slug::create_slug()
public string
# create_slug( string $string, string $replacement,… )

Create Slug

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

The name of the table

The name of the table

# ''
public string $id

The primary id field in the table

The primary id field in the table

# 'id'
public string $replacement

The replacement (Either underscore or dash)

The replacement (Either underscore or dash)

# 'dash'
CAFPE Docs API documentation generated by ApiGen