Moodle APIs 4.3
Moodle 4.3.6 (Build: 20240812)
cc_resource Class Reference

Resource Class. More...

Inheritance diagram for cc_resource:

Public Member Functions

 __construct ($manifest, $file, $folder='', $throwonerror=true)
 
 add_resource ($fname, $location='')
 Add resource.
 
 adjust_path ($mroot, $fname)
 
 full_path ($path, $dir_sep=DIRECTORY_SEPARATOR)
 
 generate_node ()
 
 generate_random_string ($length=6)
 
 get_attr_value (&$nod, $name, $ns=null)
 Get a attribute value.
 
 get_external_xml ($identifier)
 
 get_manifestroot ()
 
 import_resource (DOMElement &$node, cc_i_manifest &$doc)
 Import a resource.
 
 include_titles ($html)
 
 init_clean ()
 
 init_empty_new ()
 
 load_xml_resource ($path_to_file)
 
 move_all_files ()
 
 move_files ($files, $destination_folder)
 
 process_resource ($manifestroot, &$fname, $folder)
 Process a resource.
 
 truncate_text ($text, $max, $remove_html)
 
 update_sources ($html, $root_path='')
 

Static Public Member Functions

static safexml ($value)
 Prepares convert for inclusion into XML.
 

Public Attributes

 $base = null
 
 $dependency = array()
 
 $filename = null
 
 $files = array()
 
 $folder = null
 
 $href = null
 
 $identifier = null
 
 $identifierref = null
 
 $instructoronly = false
 
 $isempty = null
 
 $manifestroot = null
 
 $metadata = array()
 
 $persiststate = null
 
 $type = null
 

Protected Member Functions

 get_all_files ()
 
 prepare_content ($content)
 

Detailed Description

Resource Class.

Member Function Documentation

◆ add_resource()

cc_resource::add_resource ( $fname,
$location = '' )

Add resource.

Parameters
string$fname
string$location

Implements cc_i_resource.

◆ get_attr_value()

cc_resource::get_attr_value ( & $nod,
$name,
$ns = null )

Get a attribute value.

Parameters
DOMElement$nod
string$name
string$ns
Return values
string

Implements cc_i_resource.

◆ import_resource()

cc_resource::import_resource ( DOMElement & $node,
cc_i_manifest & $doc )

Import a resource.

Parameters
DOMElement$node
cc_i_manifest$doc

Implements cc_i_resource.

◆ process_resource()

cc_resource::process_resource ( $manifestroot,
& $fname,
$folder )

Process a resource.

Parameters
string$manifestroot
string$fname
string$folder

Implements cc_i_resource.

◆ safexml()

static entities::safexml ( $value)
staticinherited

Prepares convert for inclusion into XML.

Parameters
string$value
Return values
string

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