Generate and validate slugs - i.e. unique, SEO-friendly URL segments. See e.g. https://en.wikipedia.org/wiki/Semantic_URL#Slug
This is the code documentation for the SproutCMS project
Search documentation |
class SlugGenerate and validate slugs - i.e. unique, SEO-friendly URL segments. See e.g. https://en.wikipedia.org/wiki/Semantic_URL#Slug
Extending this class<?php
/**
* New class description goes here
*
* @author Your Name, 2026-09-16
**/
class NewClassName extends Slug {
/**
* Verify that a slug is unique for a given table
**/
public function unique (string $value, string $table, array $conditions) {
// Method code goes here
}
/**
* Verify that a slug contains only valid characters
**/
public function valid (string $value) {
// Method code goes here
}
/**
* Create a slug, and ensure it's unique
**/
public function create (string $table, string $name) {
// Method code goes here
}
/**
* Return all columns for a single row of a table (similar to {@see Pdb::get})
* The row is specified using its slug.
**/
public function get (string $table, string $slug, array $conditions) {
// Method code goes here
}
}
?>
|
| Powered by Pelzini, version 0.9.0 |
Documentation is made available under the
GNU Free Documentation License 1.2. Generated: Tuesday, 15th September, 2026 at 10:26 am |
|