Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.x is supported too.

Defines backup_xml_transformer class

Copyright: 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 208 lines (9 kb)
Included or required:0 times
Referenced: 1 time
Includes or requires: 0 files

Defines 1 class

backup_xml_transformer:: (7 methods):
  __construct()
  process()
  process_filephp_links()
  process_h5pembedphp_links()
  encode_absolute_links()
  process_filephp_uses()
  register_link_encoders()


Class: backup_xml_transformer  - X-Ref

Class implementing the @xml_contenttransformed logic to be applied in moodle2 backups

TODO: Finish phpdocs
__construct($courseid)   X-Ref
No description

process($content)   X-Ref
No description

process_filephp_links($content)   X-Ref
No description

process_h5pembedphp_links($content)   X-Ref
Replace all calls to /h5p/embed.php by $@H5PEMBED@$
to allow restore the /h5p/embed.php url in
other domains.

param: string $content
return: string

encode_absolute_links($content)   X-Ref
No description

process_filephp_uses($matches)   X-Ref
No description

register_link_encoders()   X-Ref
Register all available content link encoders

return: array encoder