final class Helpers

Helpers.

Methods

__construct()

No description

static 
toLower($s)

StrToLower in UTF-8.

static string
unescapeHtml(string $s)

No description

static string
freezeSpaces(string $s)

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

static string
unfreezeSpaces(string $s)

Reverts meta-spaces back to normal spaces.

static string
normalize(string $s)

Removes special controls characters and normalizes line endings and spaces.

static string
toAscii(string $s)

Converts UTF-8 to ASCII.

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

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

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

Outdents text block.

static bool
isRelative(string $URL)

Is given URL relative?

static string
prependRoot(string $URL, string $root)

Prepends root to URL, if possible.

Details

at line 22
__construct()

No description

at line 31
static toLower($s)

StrToLower in UTF-8.

Parameters

$s

at line 39
static string unescapeHtml(string $s)

No description

Parameters

string $s

Return Value

string

at line 49
static string freezeSpaces(string $s)

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

which are ignored by HtmlOutputModule routine

Parameters

string $s

Return Value

string

at line 58
static string unfreezeSpaces(string $s)

Reverts meta-spaces back to normal spaces.

Parameters

string $s

Return Value

string

at line 67
static string normalize(string $s)

Removes special controls characters and normalizes line endings and spaces.

Parameters

string $s

Return Value

string

at line 90
static string toAscii(string $s)

Converts UTF-8 to ASCII.

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

Parameters

string $s

Return Value

string

at line 113
static string webalize(string $s, string $charlist = '')

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

Parameters

string $s
string $charlist

Return Value

string

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

Outdents text block.

Parameters

string $s
bool $firstLine

Return Value

string

at line 152
static bool isRelative(string $URL)

Is given URL relative?

Parameters

string $URL

Return Value

bool

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

Prepends root to URL, if possible.

Parameters

string $URL
string $root

Return Value

string

Traits

Better OOP experience.