Skip to content
Snippets Groups Projects
Unverified Commit 821d817b authored by Tim van Dijen's avatar Tim van Dijen Committed by GitHub
Browse files

Add phpdoc

parent 117a02ea
No related branches found
No related tags found
No related merge requests found
...@@ -23,47 +23,65 @@ class Localization ...@@ -23,47 +23,65 @@ class Localization
/** /**
* The default gettext domain. * The default gettext domain.
*
* @var string
*/ */
const DEFAULT_DOMAIN = 'messages'; const DEFAULT_DOMAIN = 'messages';
/** /**
* Old internationalization backend included in SimpleSAMLphp. * Old internationalization backend included in SimpleSAMLphp.
*
* @var string
*/ */
const SSP_I18N_BACKEND = 'SimpleSAMLphp'; const SSP_I18N_BACKEND = 'SimpleSAMLphp';
/** /**
* An internationalization backend implemented purely in PHP. * An internationalization backend implemented purely in PHP.
*
* @var string
*/ */
const GETTEXT_I18N_BACKEND = 'gettext/gettext'; const GETTEXT_I18N_BACKEND = 'gettext/gettext';
/** /**
* The default locale directory * The default locale directory
*
* @var string
*/ */
private $localeDir; private $localeDir;
/** /**
* Where specific domains are stored * Where specific domains are stored
*
* @var array
*/ */
private $localeDomainMap = array(); private $localeDomainMap = array();
/** /**
* Pointer to currently active translator * Pointer to currently active translator
*
* @var Gettext\Translator
*/ */
private $translator; private $translator;
/** /**
* Pointer to current Language * Pointer to current Language
*
* @var Language
*/ */
private $language; private $language;
/** /**
* Language code representing the current Language * Language code representing the current Language
*
* @var string
*/ */
private $langcode; private $langcode;
/** /**
* The language backend to use * The language backend to use
*
* @var string
*/ */
public $i18nBackend; public $i18nBackend;
...@@ -85,6 +103,8 @@ class Localization ...@@ -85,6 +103,8 @@ class Localization
/** /**
* Dump the default locale directory * Dump the default locale directory
*
* @return string
*/ */
public function getLocaleDir() public function getLocaleDir()
{ {
...@@ -96,6 +116,8 @@ class Localization ...@@ -96,6 +116,8 @@ class Localization
* Get the default locale dir for a specific module aka. domain * Get the default locale dir for a specific module aka. domain
* *
* @param string $domain Name of module/domain * @param string $domain Name of module/domain
*
* @return string
*/ */
public function getDomainLocaleDir($domain) public function getDomainLocaleDir($domain)
{ {
...@@ -139,6 +161,8 @@ class Localization ...@@ -139,6 +161,8 @@ class Localization
* *
* @param string $domain Name of localization domain * @param string $domain Name of localization domain
* @throws Exception If the path does not exist even for the default, fallback language * @throws Exception If the path does not exist even for the default, fallback language
*
* @return string
*/ */
public function getLangPath($domain = self::DEFAULT_DOMAIN) public function getLangPath($domain = self::DEFAULT_DOMAIN)
{ {
...@@ -230,6 +254,8 @@ class Localization ...@@ -230,6 +254,8 @@ class Localization
* Test to check if backend is set to default * Test to check if backend is set to default
* *
* (if false: backend unset/there's an error) * (if false: backend unset/there's an error)
*
* @return bool
*/ */
public function isI18NBackendDefault() public function isI18NBackendDefault()
{ {
...@@ -257,6 +283,8 @@ class Localization ...@@ -257,6 +283,8 @@ class Localization
/** /**
* Show which domains are registered * Show which domains are registered
*
* @return array
*/ */
public function getRegisteredDomains() public function getRegisteredDomains()
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment