Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
tool_lpmigrate\framework_mapper Class Reference

Framework mapper class. More...

Public Member Functions

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

Protected Member Functions

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

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: