Multiple languages plugin class

access public
package kocuj_sitemap

 Methods

Something to do before or after some processing

doSomething(string $type, string $locale, integer $itemId = 0, string $additional = '') : void
access public

Parameters

$type

string

Type of something to do

$locale

string

Language locale

$itemId

integer

Item identifier - default: empty

$additional

string

Additional string - default: empty

Get singleton instance

getInstance() : object
Static
access public

Returns

objectSingleton instance

Get item

getItem(string $type, string $locale, string $origText = '', integer $itemId = 0, string $additional = '') : void
access public

Parameters

$type

string

Type of something to do

$locale

string

Language locale

$origText

string

Original text - default: empty

$itemId

integer

Item identifier - default: empty

$additional

string

Additional string - default: empty

Get path to language flag

getLanguageFlag(string $locale) : string
access public

Parameters

$locale

string

Language locale

Returns

stringPath to language flag

Get all languages list

getLanguages(string $forceMultilangOptionValue = '') : array
access public

Parameters

$forceMultilangOptionValue

string

Force 'Multilang' option value if string is not empty - default: empty

Returns

arrayLanguages list

Get selected translation plugin name

getSelectedPluginName() : string
access public

Returns

stringSelected translation plugin name or empty string if no plugin has been selected

Disable cloning of object

__clone() : void
access private

Constructor

__construct() : void
access private

Get selectedy class name

getSelectedClass(string $forceMultilangOptionValue = '') : string
access private

Parameters

$forceMultilangOptionValue

string

Force 'Multilang' option value if string is not empty - default: empty

Returns

stringSelected class name

Process callback function for the selected translation plugin

processCallback(string $callback, array $parameters = array()) : \KocujSitemapPlugin\Classes\any
access private

Parameters

$callback

string

Callback function

$parameters

array

Callback parameters

Returns

\KocujSitemapPlugin\Classes\anyReturned callback data

 Properties

 

Singleton instance

$instance : object

Default

NULL
Static
access private
 

Class has been already selected (true) or not (false)

$isSelectedClass : boolean

Default

false
access private
 

Languages cache

$languagesCache : array

Default

array()
access private
 

Selected class

$selectedClass : string

Default

''
access private