final class Helpers

Helpers.

Methods

__construct()

No description

static string
freezeSpaces($s)

Translate all white spaces (\t \n \r space) to meta-spaces \x01-\x04.

static string
unfreezeSpaces($s)

Reverts meta-spaces back to normal spaces.

static string
normalize($s)

Removes special controls characters and normalizes line endings and spaces.

static 
toAscii($s)

Converts UTF-8 to ASCII.

static string
webalize($s, $charlist = null)

Converts to web safe characters [a-z0-9-] text.

static string
outdent($s, $firstLine = false)

Outdents text block.

static bool
isRelative($URL)

Is given URL relative?

static string
prependRoot($URL, $root)

Prepends root to URL, if possible.

Details

at line 18
__construct()

No description

at line 30
static string freezeSpaces($s)

Translate all white spaces (\t \n \r space) to meta-spaces \x01-\x04.

which are ignored by TexyHtmlOutputModule routine

Parameters

$s

Return Value

string

at line 41
static string unfreezeSpaces($s)

Reverts meta-spaces back to normal spaces.

Parameters

$s

Return Value

string

at line 52
static string normalize($s)

Removes special controls characters and normalizes line endings and spaces.

Parameters

$s

Return Value

string

at line 75
static toAscii($s)

Converts UTF-8 to ASCII.

iconv('UTF-8', 'ASCII//TRANSLIT', ...) has problem with glibc!

Parameters

$s

at line 97
static string webalize($s, $charlist = null)

Converts to web safe characters [a-z0-9-] text.

Parameters

$s
$charlist

Return Value

string

at line 112
static string outdent($s, $firstLine = false)

Outdents text block.

Parameters

$s
$firstLine

Return Value

string

at line 135
static bool isRelative($URL)

Is given URL relative?

Parameters

$URL

Return Value

bool

at line 148
static string prependRoot($URL, $root)

Prepends root to URL, if possible.

Parameters

$URL
$root

Return Value

string

Traits

Better OOP experience.