@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | * _read |
| 87 | 87 | * |
| 88 | 88 | * @access private |
| 89 | - * @return mixed |
|
| 89 | + * @return string|null |
|
| 90 | 90 | * @param int $bytes |
| 91 | 91 | */ |
| 92 | 92 | function _read($bytes = 1) |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | * Load MO file |
| 166 | 166 | * |
| 167 | 167 | * @access public |
| 168 | - * @return mixed Returns true on success or PEAR_Error on failure. |
|
| 168 | + * @return boolean Returns true on success or PEAR_Error on failure. |
|
| 169 | 169 | * @param string $file |
| 170 | 170 | */ |
| 171 | 171 | function load($file = null) |
@@ -261,7 +261,7 @@ discard block |
||
| 261 | 261 | * Save MO file |
| 262 | 262 | * |
| 263 | 263 | * @access public |
| 264 | - * @return mixed Returns true on success or PEAR_Error on failure. |
|
| 264 | + * @return boolean Returns true on success or PEAR_Error on failure. |
|
| 265 | 265 | * @param string $file |
| 266 | 266 | */ |
| 267 | 267 | function save($file = null) |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | * Load PO file |
| 68 | 68 | * |
| 69 | 69 | * @access public |
| 70 | - * @return mixed Returns true on success or PEAR_Error on failure. |
|
| 70 | + * @return boolean Returns true on success or PEAR_Error on failure. |
|
| 71 | 71 | * @param string $file |
| 72 | 72 | */ |
| 73 | 73 | function load($file = null) |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | * Save PO file |
| 117 | 117 | * |
| 118 | 118 | * @access public |
| 119 | - * @return mixed Returns true on success or PEAR_Error on failure. |
|
| 119 | + * @return boolean Returns true on success or PEAR_Error on failure. |
|
| 120 | 120 | * @param string $file |
| 121 | 121 | */ |
| 122 | 122 | function save($file = null) |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | * |
| 119 | 119 | * @static |
| 120 | 120 | * @access public |
| 121 | - * @return mixed Returns true on success or PEAR_Error on failure. |
|
| 121 | + * @return boolean Returns true on success or PEAR_Error on failure. |
|
| 122 | 122 | * @param string $pofile path to GNU PO file |
| 123 | 123 | * @param string $mofile path to GNU MO file |
| 124 | 124 | */ |
@@ -260,7 +260,7 @@ discard block |
||
| 260 | 260 | * toMO |
| 261 | 261 | * |
| 262 | 262 | * @access protected |
| 263 | - * @return object File_Gettext_MO |
|
| 263 | + * @return TGettext_MO File_Gettext_MO |
|
| 264 | 264 | */ |
| 265 | 265 | function toMO() |
| 266 | 266 | { |
@@ -274,7 +274,7 @@ discard block |
||
| 274 | 274 | * toPO |
| 275 | 275 | * |
| 276 | 276 | * @access protected |
| 277 | - * @return object File_Gettext_PO |
|
| 277 | + * @return TGettext_PO File_Gettext_PO |
|
| 278 | 278 | */ |
| 279 | 279 | function toPO() |
| 280 | 280 | { |
@@ -109,6 +109,7 @@ |
||
| 109 | 109 | /** |
| 110 | 110 | * Set the culture for this particular message source. |
| 111 | 111 | * @param string the Culture name. |
| 112 | + * @return void |
|
| 112 | 113 | */ |
| 113 | 114 | function setCulture($culture); |
| 114 | 115 | |
@@ -99,9 +99,7 @@ |
||
| 99 | 99 | * Get the data from the cache. |
| 100 | 100 | * @param string $catalogue The translation section. |
| 101 | 101 | * @param string $culture The translation locale, e.g. "en_AU". |
| 102 | - * @param string $filename If the source is a file, this file's modified |
|
| 103 | - * time is newer than the cache's modified time, no cache hit. |
|
| 104 | - * @return mixed Boolean FALSE if no cache hit. Otherwise, translation |
|
| 102 | + * @return false|string Boolean FALSE if no cache hit. Otherwise, translation |
|
| 105 | 103 | * table data for the specified section and locale. |
| 106 | 104 | */ |
| 107 | 105 | public function get($catalogue, $culture, $lastmodified=0) |
@@ -111,6 +111,7 @@ discard block |
||
| 111 | 111 | /** |
| 112 | 112 | * Sets the charset for message output. |
| 113 | 113 | * @param string charset, default is UTF-8 |
| 114 | + * @param string $charset |
|
| 114 | 115 | */ |
| 115 | 116 | public function setCharset($charset) |
| 116 | 117 | { |
@@ -171,9 +172,9 @@ discard block |
||
| 171 | 172 | |
| 172 | 173 | /** |
| 173 | 174 | * Do string translation. |
| 174 | - * @param string the string to translate. |
|
| 175 | + * @param string string string to translate. |
|
| 175 | 176 | * @param array a list of string to substitute. |
| 176 | - * @param string get the translation from a particular message |
|
| 177 | + * @param string string the translation from a particular message |
|
| 177 | 178 | * catalogue. |
| 178 | 179 | * @return string translated string. |
| 179 | 180 | */ |
@@ -252,6 +252,7 @@ discard block |
||
| 252 | 252 | /** |
| 253 | 253 | * Set the culture for this message source. |
| 254 | 254 | * @param string culture name |
| 255 | + * @param string $culture |
|
| 255 | 256 | */ |
| 256 | 257 | public function setCulture($culture) |
| 257 | 258 | { |
@@ -270,6 +271,7 @@ discard block |
||
| 270 | 271 | /** |
| 271 | 272 | * Get the last modified unix-time for this particular catalogue+variant. |
| 272 | 273 | * @param string catalogue+variant |
| 274 | + * @param string $source |
|
| 273 | 275 | * @return int last modified in unix-time format. |
| 274 | 276 | */ |
| 275 | 277 | protected function getLastModified($source) |
@@ -281,6 +283,7 @@ discard block |
||
| 281 | 283 | * Load the message for a particular catalogue+variant. |
| 282 | 284 | * This methods needs to implemented by subclasses. |
| 283 | 285 | * @param string catalogue+variant. |
| 286 | + * @param string $variant |
|
| 284 | 287 | * @return array of translation messages. |
| 285 | 288 | */ |
| 286 | 289 | protected function &loadData($variant) |
@@ -301,6 +304,7 @@ discard block |
||
| 301 | 304 | /** |
| 302 | 305 | * Determine if the source is valid. |
| 303 | 306 | * @param string catalogue+variant |
| 307 | + * @param string $source |
|
| 304 | 308 | * @return boolean true if valid, false otherwise. |
| 305 | 309 | */ |
| 306 | 310 | protected function isValidSource($source) |
@@ -312,6 +316,7 @@ discard block |
||
| 312 | 316 | * Get all the variants of a particular catalogue. |
| 313 | 317 | * This method must be implemented by subclasses. |
| 314 | 318 | * @param string catalogue name |
| 319 | + * @param string $catalogue |
|
| 315 | 320 | * @return array list of all variants for this catalogue. |
| 316 | 321 | */ |
| 317 | 322 | protected function getCatalogueList($catalogue) |
@@ -60,6 +60,7 @@ discard block |
||
| 60 | 60 | /** |
| 61 | 61 | * Creates the DB connection. |
| 62 | 62 | * @param string the module ID for TDataSourceConfig |
| 63 | + * @param string $connectionID |
|
| 63 | 64 | * @return TDbConnection the created DB connection |
| 64 | 65 | * @throws TConfigurationException if module ID is invalid or empty |
| 65 | 66 | */ |
@@ -185,7 +186,7 @@ discard block |
||
| 185 | 186 | |
| 186 | 187 | /** |
| 187 | 188 | * Update the catalogue last modified time. |
| 188 | - * @return boolean true if updated, false otherwise. |
|
| 189 | + * @return integer true if updated, false otherwise. |
|
| 189 | 190 | */ |
| 190 | 191 | private function updateCatalogueTime($cat_id, $variant) |
| 191 | 192 | { |
@@ -200,6 +200,9 @@ discard block |
||
| 200 | 200 | return false; |
| 201 | 201 | } |
| 202 | 202 | |
| 203 | + /** |
|
| 204 | + * @param string $MOFile |
|
| 205 | + */ |
|
| 203 | 206 | private function getPOFile($MOFile) |
| 204 | 207 | { |
| 205 | 208 | $filebase = substr($MOFile, 0, strlen($MOFile)-strlen($this->dataExt)); |
@@ -422,6 +425,9 @@ discard block |
||
| 422 | 425 | return $catalogue; |
| 423 | 426 | } |
| 424 | 427 | |
| 428 | + /** |
|
| 429 | + * @param string $catalogue |
|
| 430 | + */ |
|
| 425 | 431 | protected function createMessageTemplate($catalogue) |
| 426 | 432 | { |
| 427 | 433 | if($catalogue === null) { |