Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
tool_lpmigrate\framework_mapper Class Reference

Framework mapper class. More...

Public Member Functions

 __construct ($from, $to)
 Constructor.
 
 add_mapping ($idfrom, $idto)
 Add a mapping.
 
 automap ()
 Auto map the frameworks.
 
 get_all_from ()
 Get all IDs at origin.
 
 get_all_to ()
 Get all IDs at destination.
 
 get_mappings ()
 Get the defined mappings.
 
 get_unmapped_from ()
 Get the IDs of the objects at origin which do not have a mapping at destination.
 
 get_unmapped_objects_from ()
 Get the origin objects with missing mappings.
 
 get_unmapped_objects_to ()
 Get the destination objects with missing mappings.
 
 get_unmapped_to ()
 Get the IDs of the objects at destination which do not have a mapping at origin.
 
 has_mappings ()
 Whether some mappings were set.
 
 reset_mappings ()
 Reset the mappings.
 

Protected Member Functions

 get_collection_from ()
 Get the collection at origin.
 
 get_collection_to ()
 Get the collection at destination.
 

Protected Attributes

array $collectionfrom
 The collection of objects at origin.
 
array $collectionto
 The collection of objects at destination.
 
int $from
 The ID of the framework we're migrating from.
 
array $mappings = array()
 Mappings.
 
int $to
 The ID of the framework we're migrating to.
 

Detailed Description

Framework mapper class.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Constructor & Destructor Documentation

◆ __construct()

tool_lpmigrate\framework_mapper::__construct ( $from,
$to )

Constructor.

Parameters
int$fromFramework ID from.
int$toFramework ID to.

Member Function Documentation

◆ add_mapping()

tool_lpmigrate\framework_mapper::add_mapping ( $idfrom,
$idto )

Add a mapping.

Parameters
int$idfromFrom ID.
int$idtoTo ID.

◆ automap()

tool_lpmigrate\framework_mapper::automap ( )

Auto map the frameworks.

Return values
void

◆ get_all_from()

tool_lpmigrate\framework_mapper::get_all_from ( )

Get all IDs at origin.

Return values
array

◆ get_all_to()

tool_lpmigrate\framework_mapper::get_all_to ( )

Get all IDs at destination.

Return values
array

◆ get_collection_from()

tool_lpmigrate\framework_mapper::get_collection_from ( )
protected

Get the collection at origin.

Return values
array

◆ get_collection_to()

tool_lpmigrate\framework_mapper::get_collection_to ( )
protected

Get the collection at destination.

Return values
array

◆ get_mappings()

tool_lpmigrate\framework_mapper::get_mappings ( )

Get the defined mappings.

Return values
array

◆ get_unmapped_from()

tool_lpmigrate\framework_mapper::get_unmapped_from ( )

Get the IDs of the objects at origin which do not have a mapping at destination.

Return values
array

◆ get_unmapped_objects_from()

tool_lpmigrate\framework_mapper::get_unmapped_objects_from ( )

Get the origin objects with missing mappings.

Return values
array

◆ get_unmapped_objects_to()

tool_lpmigrate\framework_mapper::get_unmapped_objects_to ( )

Get the destination objects with missing mappings.

Return values
array

◆ get_unmapped_to()

tool_lpmigrate\framework_mapper::get_unmapped_to ( )

Get the IDs of the objects at destination which do not have a mapping at origin.

Return values
array

◆ has_mappings()

tool_lpmigrate\framework_mapper::has_mappings ( )

Whether some mappings were set.

Return values
bool

◆ reset_mappings()

tool_lpmigrate\framework_mapper::reset_mappings ( )

Reset the mappings.

Return values
void

The documentation for this class was generated from the following file: