Editor PHP 2.4.0

AsciiSlugger
in package
implements SluggerInterface, LocaleAwareInterface

Tags
author

Titouan Galopin galopintitouan@gmail.com

Table of Contents

Interfaces

SluggerInterface
Creates a URL-friendly slug from a given string.
LocaleAwareInterface

Methods

__construct()  : mixed
getLocale()  : string
setLocale()  : void
slug()  : AbstractUnicodeString
Creates a slug for the given string and locale, using appropriate transliteration when needed.
withEmoji()  : static

Methods

__construct()

public __construct([string|null $defaultLocale = null ][, array<string|int, mixed>|Closure|null $symbolsMap = null ]) : mixed
Parameters
$defaultLocale : string|null = null
$symbolsMap : array<string|int, mixed>|Closure|null = null

getLocale()

public getLocale() : string
Return values
string

setLocale()

public setLocale(string $locale) : void
Parameters
$locale : string

slug()

Creates a slug for the given string and locale, using appropriate transliteration when needed.

public slug(string $string[, string $separator = '-' ][, string|null $locale = null ]) : AbstractUnicodeString
Parameters
$string : string
$separator : string = '-'
$locale : string|null = null
Return values
AbstractUnicodeString

withEmoji()

public withEmoji([bool|string $emoji = true ]) : static
Parameters
$emoji : bool|string = true

true will use the same locale, false will disable emoji, and a string to use a specific locale

Return values
static

        
On this page

Search results