MockMessageCollection Class Reference

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

List of all members.

Public Member Functions

 __construct ($messages)
 Constructors.
 filter ($type, $condition=true, $value=null)
 Filters messages based on some condition.

Detailed Description

Definition at line 70 of file AndroidXmlFFSTest.php.


Constructor & Destructor Documentation

MockMessageCollection::__construct ( code  ) 

Constructors.

Use newFromDefinitions() instead.

Parameters:
string $code Language code.

Reimplemented from MessageCollection.

Definition at line 71 of file AndroidXmlFFSTest.php.

Here is the call graph for this function:


Member Function Documentation

MockMessageCollection::filter ( type,
condition = true,
value = null 
)

Filters messages based on some condition.

Some filters cause data to be loaded from the database. PAGEINFO: existence and fuzzy tags. TRANSLATIONS: translations for every message. It is recommended to first filter with messages that do not need those. It is recommended to add translations from file with addInfile, and it is needed for changed filter to work.

Parameters:
string $type

  • fuzzy: messages with fuzzy tag (PAGEINFO)
  • optional: messages marked for optional.
  • ignored: messages which are not for translation.
  • hastranslation: messages which have translation (be if fuzzy or not) (PAGEINFO, *INFILE).
  • translated: messages which have translation which is not fuzzy (PAGEINFO, *INFILE).
  • changed: translation in database differs from infile. (INFILE, TRANSLATIONS)
bool $condition Whether to return messages which do not satisfy the given filter condition (true), or only which do (false).
mixed $value Value for properties filtering.
Exceptions:
MWException If given invalid filter name.

Reimplemented from MessageCollection.

Definition at line 83 of file AndroidXmlFFSTest.php.


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