Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.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