diff options
author | Jaime Perez Crespo <jaime.perez@uninett.no> | 2016-02-05 15:24:46 +0100 |
---|---|---|
committer | Jaime Perez Crespo <jaime.perez@uninett.no> | 2016-02-05 15:24:46 +0100 |
commit | c39d1b8c7e8541eb655eb00fb013255505742b3a (patch) | |
tree | da61604222f2af3b0c235e55b99073e56837cb2c /lib/SimpleSAML | |
parent | 575831964d10611307e0bbff2b289af2c9ba7355 (diff) | |
download | simplesamlphp-c39d1b8c7e8541eb655eb00fb013255505742b3a.zip simplesamlphp-c39d1b8c7e8541eb655eb00fb013255505742b3a.tar.gz simplesamlphp-c39d1b8c7e8541eb655eb00fb013255505742b3a.tar.bz2 |
More bugfixes. The SimpleSAML\Locale\Language::$languageParameterName and SimpleSAML\Locale\Language::$language properties should be private, and therefore not accessed from the outside of their respective classes. Add getters instead.
Diffstat (limited to 'lib/SimpleSAML')
-rw-r--r-- | lib/SimpleSAML/Locale/Language.php | 13 | ||||
-rw-r--r-- | lib/SimpleSAML/Locale/Translate.php | 11 |
2 files changed, 23 insertions, 1 deletions
diff --git a/lib/SimpleSAML/Locale/Language.php b/lib/SimpleSAML/Locale/Language.php index 544e20d..7d22791 100644 --- a/lib/SimpleSAML/Locale/Language.php +++ b/lib/SimpleSAML/Locale/Language.php @@ -28,7 +28,7 @@ class Language /** * HTTP GET language parameter name. */ - public $languageParameterName = 'language'; + private $languageParameterName = 'language'; /** @@ -114,6 +114,17 @@ class Language /** + * Get the language parameter name. + * + * @return string The language parameter name. + */ + public function getLanguageParameterName() + { + return $this->languageParameterName; + } + + + /** * This method returns the preferred language for the user based on the Accept-Language HTTP header. * * @return string The preferred language based on the Accept-Language HTTP header, or null if none of the languages diff --git a/lib/SimpleSAML/Locale/Translate.php b/lib/SimpleSAML/Locale/Translate.php index 01de9e0..ebbac32 100644 --- a/lib/SimpleSAML/Locale/Translate.php +++ b/lib/SimpleSAML/Locale/Translate.php @@ -69,6 +69,17 @@ class Translate /** + * Return the internal language object used by this translator. + * + * @return \SimpleSAML\Locale\Language + */ + public function getLanguage() + { + return $this->language; + } + + + /** * This method retrieves a dictionary with the name given. * * @param string $name The name of the dictionary, as the filename in the dictionary directory, without the |