ApplicationHelper

Application helper functions

since

1.5

Methods

addClientInfo

Adds information for a client.

addClientInfo(mixed $client) : boolean
static
since

1.6

Arguments

$client

mixedA client identifier either an array or object

Response

booleanTrue if the information is added. False on error

getClientInfo

Gets information on a specific client id. This method will be useful in future versions when we start mapping applications in the database.

getClientInfo(integer|string|null $id = null, boolean $byName = false) : \stdClass|array|void
static

This method will return a client information array if called with no arguments which can be used to add custom application information.

since

1.5

Arguments

$id

integer|string|nullA client identifier

$byName

booleanIf true, find the client by its name

Response

\stdClass|array|voidObject describing the client, array containing all the clients or void if $id not known

getComponentName

Return the name of the request component [main component]

getComponentName(string $default = null) : string
static
since

1.6

Arguments

$default

stringThe default option

Response

stringOption (e.g. com_something)

getHash

Provides a secure hash based on a seed

getHash(string $seed) : string
static
since

3.2

Arguments

$seed

stringSeed string.

Response

stringA secure hash

stringURLSafe

This method transliterates a string into a URL safe string or returns a URL safe UTF-8 string based on the global configuration

stringURLSafe(string $string, string $language = '') : string
static
since

3.2

Arguments

$string

stringString to process

$language

stringLanguage to transliterate to if unicode slugs are disabled

Response

stringProcessed string

Properties

_clients

Client information array

static
since

1.6

Type(s)

array