Moodle  2.2.1
http://www.collinsharper.com
testable_convert_helper Class Reference
Inheritance diagram for testable_convert_helper:
Collaboration diagram for testable_convert_helper:

Static Public Member Functions

static choose_conversion_path ($format, array $descriptions)
 end of public API //////////////////////////////////////////////////////

Detailed Description

Provides access to the protected methods we need to test

Definition at line 34 of file testconverthelper.php.


Member Function Documentation

static choose_conversion_path ( format,
array descriptions 
) [static]

end of public API //////////////////////////////////////////////////////

Choose the best conversion path for the given format

Given the source format and the list of available converters and their properties, this methods picks the most effective way how to convert the source format into the target moodle2 format. The method returns a list of converters that should be called, in order.

This implementation uses Dijkstra's algorithm to find the shortest way through the oriented graph.

See also:
http://en.wikipedia.org/wiki/Dijkstra's_algorithm
Author:
David Mudrak <david@moodle.com>
Parameters:
string$formatthe source backup format, one of backup::FORMAT_xxx
array$descriptionslist of base_converter::description() indexed by the converter name
Returns:
array ordered list of converter names to call (may be empty if not reachable)

Reimplemented from convert_helper.

Definition at line 36 of file testconverthelper.php.

Here is the caller graph for this function:


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations