Update PHPDoc for I10N, OC_Config, OC\Template\Base and OCP\IL10N

This commit is contained in:
Bart Visscher 2014-02-28 13:37:41 +01:00
parent 6335f855f9
commit 89e0763d3d
4 changed files with 26 additions and 27 deletions

View File

@ -73,9 +73,9 @@ class OC_L10N implements \OCP\IL10N {
/** /**
* get an L10N instance * get an L10N instance
* @param $app string * @param string $app
* @param $lang string|null * @param string|null $lang
* @return OC_L10N * @return \OC_L10N
*/ */
public static function get($app, $lang=null) { public static function get($app, $lang=null) {
if (is_null($lang)) { if (is_null($lang)) {
@ -87,9 +87,8 @@ class OC_L10N implements \OCP\IL10N {
/** /**
* @brief The constructor * @brief The constructor
* @param $app string app requesting l10n * @param string $app app requesting l10n
* @param $lang string default: null Language * @param string $lang default: null Language
* @returns OC_L10N-Object
* *
* If language is not set, the constructor tries to find the right * If language is not set, the constructor tries to find the right
* language. * language.
@ -237,7 +236,7 @@ class OC_L10N implements \OCP\IL10N {
/** /**
* @brief Translating * @brief Translating
* @param $text String The text we need a translation for * @param string $text The text we need a translation for
* @param array $parameters default:array() Parameters for sprintf * @param array $parameters default:array() Parameters for sprintf
* @return \OC_L10N_String Translation or the same text * @return \OC_L10N_String Translation or the same text
* *
@ -250,9 +249,9 @@ class OC_L10N implements \OCP\IL10N {
/** /**
* @brief Translating * @brief Translating
* @param $text_singular String the string to translate for exactly one object * @param string $text_singular the string to translate for exactly one object
* @param $text_plural String the string to translate for n objects * @param string $text_plural the string to translate for n objects
* @param $count Integer Number of objects * @param integer $count Number of objects
* @param array $parameters default:array() Parameters for sprintf * @param array $parameters default:array() Parameters for sprintf
* @return \OC_L10N_String Translation or the same text * @return \OC_L10N_String Translation or the same text
* *
@ -351,8 +350,8 @@ class OC_L10N implements \OCP\IL10N {
/** /**
* @brief Localization * @brief Localization
* @param $type Type of localization * @param string $type Type of localization
* @param $params parameters for this localization * @param array $params parameters for this localization
* @returns String or false * @returns String or false
* *
* Returns the localized data. * Returns the localized data.
@ -406,7 +405,7 @@ class OC_L10N implements \OCP\IL10N {
/** /**
* @brief Choose a language * @brief Choose a language
* @param $texts Associative Array with possible strings * @param array $texts Associative Array with possible strings
* @returns String * @returns String
* *
* $text is an array 'de' => 'hallo welt', 'en' => 'hello world', ... * $text is an array 'de' => 'hallo welt', 'en' => 'hello world', ...
@ -421,7 +420,7 @@ class OC_L10N implements \OCP\IL10N {
/** /**
* @brief find the best language * @brief find the best language
* @param $app Array or string, details below * @param array|string $app Array or string, details below
* @returns string language * @returns string language
* *
* If $app is an array, ownCloud assumes that these are the available * If $app is an array, ownCloud assumes that these are the available
@ -494,7 +493,7 @@ class OC_L10N implements \OCP\IL10N {
/** /**
* @brief find the l10n directory * @brief find the l10n directory
* @param $app App that needs to be translated * @param string $app App that needs to be translated
* @returns directory * @returns directory
*/ */
protected static function findI18nDir($app) { protected static function findI18nDir($app) {
@ -514,7 +513,7 @@ class OC_L10N implements \OCP\IL10N {
/** /**
* @brief find all available languages for an app * @brief find all available languages for an app
* @param $app App that needs to be translated * @param string $app App that needs to be translated
* @returns array an array of available languages * @returns array an array of available languages
*/ */
public static function findAvailableLanguages($app=null) { public static function findAvailableLanguages($app=null) {

View File

@ -63,8 +63,8 @@ class OC_Config {
/** /**
* @brief Gets a value from config.php * @brief Gets a value from config.php
* @param string $key key * @param string $key key
* @param string $default = null default value * @param mixed $default = null default value
* @return string the value or $default * @return mixed the value or $default
* *
* This function gets the value from config.php. If it does not exist, * This function gets the value from config.php. If it does not exist,
* $default will be returned. * $default will be returned.
@ -76,7 +76,7 @@ class OC_Config {
/** /**
* @brief Sets a value * @brief Sets a value
* @param string $key key * @param string $key key
* @param string $value value * @param mixed $value value
* *
* This function sets the value and writes the config.php. * This function sets the value and writes the config.php.
* *

View File

@ -61,7 +61,7 @@ class Base {
/** /**
* @brief Assign variables * @brief Assign variables
* @param string $key key * @param string $key key
* @param string $value value * @param mixed $value value
* @return bool * @return bool
* *
* This function assigns a variable. It can be accessed via $_[$key] in * This function assigns a variable. It can be accessed via $_[$key] in
@ -77,7 +77,7 @@ class Base {
/** /**
* @brief Appends a variable * @brief Appends a variable
* @param string $key key * @param string $key key
* @param string $value value * @param mixed $value value
* @return boolean|null * @return boolean|null
* *
* This function assigns a variable in an array context. If the key already * This function assigns a variable in an array context. If the key already

View File

@ -23,7 +23,7 @@ namespace OCP;
interface IL10N { interface IL10N {
/** /**
* Translating * Translating
* @param $text String The text we need a translation for * @param string $text The text we need a translation for
* @param array $parameters default:array() Parameters for sprintf * @param array $parameters default:array() Parameters for sprintf
* @return \OC_L10N_String Translation or the same text * @return \OC_L10N_String Translation or the same text
* *
@ -34,9 +34,9 @@ interface IL10N {
/** /**
* Translating * Translating
* @param $text_singular String the string to translate for exactly one object * @param string $text_singular the string to translate for exactly one object
* @param $text_plural String the string to translate for n objects * @param string $text_plural the string to translate for n objects
* @param $count Integer Number of objects * @param Integer $count Number of objects
* @param array $parameters default:array() Parameters for sprintf * @param array $parameters default:array() Parameters for sprintf
* @return \OC_L10N_String Translation or the same text * @return \OC_L10N_String Translation or the same text
* *
@ -51,8 +51,8 @@ interface IL10N {
/** /**
* Localization * Localization
* @param $type Type of localization * @param string $type Type of localization
* @param $params parameters for this localization * @param array $params parameters for this localization
* @return String or false * @return String or false
* *
* Returns the localized data. * Returns the localized data.