TranslatePerLanguageStats Class Reference
[Statistics]

Graph which provides statistics on active users and number of translations. More...

Inheritance diagram for TranslatePerLanguageStats:
Inheritance graph
[legend]
Collaboration diagram for TranslatePerLanguageStats:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 __construct (FormOptions $opts)
 Constructor.
 preQuery (&$tables, &$fields, &$conds, &$type, &$options, $start, $end)
 Query details that the graph must fill.
 indexOf ($row)
 Return the indexes which this result contributes to.
 labels ()
 Return the names of the variables being measured.
 getTimestamp ($row)
 Return the timestamp associated with this result row.

Protected Member Functions

 makeLabel ($group, $code)
 Makes a label for variable.
 combineTwoArrays ($groups, $codes)
 Cross-product of two lists with string results, where either list can be empty.
 formatTimestamp ($timestamp)
 Returns unique index for given item in the scale being used.

Protected Attributes

 $usercache
 array ( string => bool ) Cache used to count active users only once per day.
 $codes
 $groups

Detailed Description

Graph which provides statistics on active users and number of translations.

Definition at line 810 of file SpecialTranslationStats.php.


Constructor & Destructor Documentation

TranslatePerLanguageStats::__construct ( FormOptions $  opts  ) 

Constructor.

The implementation can access the graph options, but not define new ones.

Parameters:
FormOptions $opts

Reimplemented from TranslationStatsBase.

Definition at line 816 of file SpecialTranslationStats.php.


Member Function Documentation

TranslatePerLanguageStats::combineTwoArrays ( groups,
codes 
) [protected]

Cross-product of two lists with string results, where either list can be empty.

Parameters:
string[] $groups Group names.
string[] $codes Language codes.
Returns:
string[] Labels.

Definition at line 944 of file SpecialTranslationStats.php.

Referenced by ReviewPerLanguageStats::indexOf(), indexOf(), ReviewPerLanguageStats::labels(), and labels().

Here is the call graph for this function:

TranslatePerLanguageStats::formatTimestamp ( timestamp  )  [protected]

Returns unique index for given item in the scale being used.

Called a lot, so performance intensive.

Parameters:
string $timestamp Timestamp in mediawiki format.
Returns:
string

Definition at line 969 of file SpecialTranslationStats.php.

Referenced by ReviewPerLanguageStats::indexOf(), and indexOf().

Here is the call graph for this function:

TranslatePerLanguageStats::getTimestamp ( row  ) 

Return the timestamp associated with this result row.

Parameters:
array $row Database Result Row
Returns:
  String   Timestamp.

Implements TranslationStatsInterface.

Reimplemented in ReviewPerLanguageStats.

Definition at line 918 of file SpecialTranslationStats.php.

TranslatePerLanguageStats::indexOf ( row  ) 

Return the indexes which this result contributes to.

Return 'all' if only one variable is measured. Return false if none.

Parameters:
array $row Database Result Row

Reimplemented from TranslationStatsBase.

Reimplemented in ReviewPerLanguageStats.

Definition at line 870 of file SpecialTranslationStats.php.

Here is the call graph for this function:

TranslatePerLanguageStats::labels (  ) 

Return the names of the variables being measured.

Return 'all' if only one variable is measured. Must match indexes returned by indexOf() and contain them all.

Returns:
string[]

Reimplemented from TranslationStatsBase.

Reimplemented in ReviewPerLanguageStats.

Definition at line 914 of file SpecialTranslationStats.php.

Here is the call graph for this function:

TranslatePerLanguageStats::makeLabel ( group,
code 
) [protected]

Makes a label for variable.

If group or language code filters, or both are used, combine those in a pretty way.

Parameters:
string $group Group name.
string $code Language code.
Returns:
string Label.

Definition at line 929 of file SpecialTranslationStats.php.

Referenced by combineTwoArrays().

TranslatePerLanguageStats::preQuery ( &$  tables,
&$  fields,
&$  conds,
&$  type,
&$  options,
start,
end 
)

Query details that the graph must fill.

Parameters:
array $tables Empty list. Append table names.
array $fields Empty list. Append field names.
array $conds Empty array. Append select conditions.
string $type Append graph type (used to identify queries).
array $options Empty array. Append extra query options.
string $start Precalculated start cutoff timestamp
string $end Precalculated end cutoff timestamp

Implements TranslationStatsInterface.

Reimplemented in ReviewPerLanguageStats.

Definition at line 822 of file SpecialTranslationStats.php.

Here is the call graph for this function:


Member Data Documentation

TranslatePerLanguageStats::$codes [protected]
TranslatePerLanguageStats::$groups [protected]
TranslatePerLanguageStats::$usercache [protected]

array ( string => bool ) Cache used to count active users only once per day.

Definition at line 812 of file SpecialTranslationStats.php.


The documentation for this class was generated from the following file:
Generated on Tue Oct 29 00:00:55 2013 for MediaWiki Translate Extension by  doxygen 1.6.3