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

Resource Class. More...

Inheritance diagram for cc_resource:
cc_i_resource entities

Public Member Functions

 __construct ($manifest, $file, $folder='', $throwonerror=true)
 
 add_resource ($fname, $location='')
 Add resource. More...
 
 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. More...
 
 get_external_xml ($identifier)
 
 get_manifestroot ()
 
 import_resource (DOMElement &$node, cc_i_manifest &$doc)
 Import a resource. More...
 
 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. More...
 
 truncate_text ($text, $max, $remove_html)
 
 update_sources ($html, $root_path='')
 

Static Public Member Functions

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

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: