class ApplicationHelper

Application helper functions

Methods

static  string
getComponentName( string $default = null)

Return the name of the request component [main component]

static  string
getHash( string $seed)

Provides a secure hash based on a seed

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

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

static  mixed
getClientInfo( integer $id = null, boolean $byName = false)

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

static  boolean
addClientInfo( mixed $client)

Adds information for a client.

static  array
parseXMLInstallFile( string $path)

Parse a XML install manifest file.

static  array
parseXMLLangMetaFile( string $path)

Parse a XML language meta file.

Details

static string getComponentName( string $default = null)

Return the name of the request component [main component]

Parameters

string $default The default option

Return Value

string Option (e.g. com_something)

static string getHash( string $seed)

Provides a secure hash based on a seed

Parameters

string $seed Seed string.

Return Value

string A secure hash

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

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

Parameters

string $string String to process
string $language Language to transliterate to if unicode slugs are disabled

Return Value

string Processed string

static mixed getClientInfo( integer $id = null, boolean $byName = false)

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

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

Parameters

integer $id A client identifier
boolean $byName If True, find the client by its name

Return Value

mixed Object describing the client or false if not known

static boolean addClientInfo( mixed $client)

Adds information for a client.

Parameters

mixed $client A client identifier either an array or object

Return Value

boolean True if the information is added. False on error

static array parseXMLInstallFile( string $path)

Parse a XML install manifest file.

XML Root tag should be 'install' except for languages which use meta file.

Parameters

string $path Full path to XML file.

Return Value

array XML metadata.

static array parseXMLLangMetaFile( string $path)

Parse a XML language meta file.

XML Root tag for languages which is meta file.

Parameters

string $path Full path to XML file.

Return Value

array XML metadata.