SproutCMS

This is the code documentation for the SproutCMS project

Page options:

Inherited members

class Slug

Generate and validate slugs - i.e. unique, SEO-friendly URL segments.
See e.g. https://en.wikipedia.org/wiki/Semantic_URL#Slug

Functions

NameVisibilityDescription
createpublic (static)Create a slug, and ensure it's unique
getpublic (static)Return all columns for a single row of a table (similar to Pdb::get)
uniquepublic (static)Verify that a slug is unique for a given table
validpublic (static)Verify that a slug contains only valid characters

public create

string Slug::create ( string $table , string $name );

Create a slug, and ensure it's unique

public get

array Slug::get ( string $table , string $slug , array $conditions );

Return all columns for a single row of a table (similar to Pdb::get)
The row is specified using its slug.

public unique

void Slug::unique ( string $value , string $table , array $conditions );

Verify that a slug is unique for a given table

public valid

void Slug::valid ( string $value );

Verify that a slug contains only valid characters