Browse Source

Added missing phpdoc

tags/2.0.0-alpha
Alexander Makarov 11 years ago
parent
commit
cb0d741281
  1. 16
      framework/yii/console/controllers/MessageController.php
  2. 7
      framework/yii/helpers/base/HtmlPurifier.php
  3. 7
      framework/yii/helpers/base/Markdown.php
  4. 9
      framework/yii/i18n/GettextMessageSource.php

16
framework/yii/console/controllers/MessageController.php

@ -115,6 +115,13 @@ class MessageController extends Controller
}
}
/**
* Extracts messages from a file
*
* @param string $fileName name of the file to extract messages from
* @param string $translator name of the function used to translate messages
* @return array
*/
protected function extractMessages($fileName, $translator)
{
echo "Extracting messages from $fileName...\n";
@ -135,6 +142,15 @@ class MessageController extends Controller
return $messages;
}
/**
* Writes messages into file
*
* @param array $messages
* @param string $fileName name of the file to write to
* @param boolean $overwrite if existing file should be overwritten without backup
* @param boolean $removeOld if obsolete translations should be removed
* @param boolean $sort if translations should be sorted
*/
protected function generateMessageFile($messages, $fileName, $overwrite, $removeOld, $sort)
{
echo "Saving messages to $fileName...";

7
framework/yii/helpers/base/HtmlPurifier.php

@ -16,6 +16,13 @@ namespace yii\helpers\base;
*/
class HtmlPurifier
{
/**
* Passes markup through HTMLPurifier making it safe to output to end user
*
* @param string $content
* @param array|null $config
* @return string
*/
public static function process($content, $config = null)
{
$purifier=\HTMLPurifier::instance($config);

7
framework/yii/helpers/base/Markdown.php

@ -37,6 +37,13 @@ class Markdown
*/
protected static $markdown;
/**
* Converts markdown into HTML
*
* @param string $content
* @param array $config
* @return string
*/
public static function process($content, $config = array())
{
if (static::$markdown === null) {

9
framework/yii/i18n/GettextMessageSource.php

@ -31,6 +31,15 @@ class GettextMessageSource extends MessageSource
*/
public $useBigEndian = false;
/**
* Loads the message translation for the specified language and category.
* Child classes should override this method to return the message translations of
* the specified language and category.
* @param string $category the message category
* @param string $language the target language
* @return array the loaded messages. The keys are original messages, and the values
* are translated messages.
*/
protected function loadMessages($category, $language)
{
$messageFile = Yii::getAlias($this->basePath) . '/' . $language . '/' . $this->catalog;

Loading…
Cancel
Save