TwistPHP Documentation

slug

File path: dist/twist/Core/Models/Tools.model.php
Namespace: Twist\Core\Models
Extends:

slugGenerate a URL-friendly slug of a string

Parameters

Name Type Description
$strRawstringn/a
[$arrExistingSlugs = array()]arrayn/a
[$intMaxLength = null]integern/a

Return Values

void — No return information has been documented for this function.

Example

<?php
//Set the variables for the example
$strRaw 'foo';
$arrExistingSlugs = array();
$intMaxLength null;

//Call the function slug with the example vars
$resTools = new \Twist\Core\Models\Tools();
$resTools -> slug($strRaw$arrExistingSlugs$intMaxLength);