SproutCMS

This is the code documentation for the SproutCMS project

class Slug

Generate 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
    }
    
}
?>