CC_Topic
extends TsugiDOM
in package
Wrap the DOMDocument class with some convienence methods
Sample use:
$blti_ns = 'http://www.imsglobal.org/xsd/imsbasiclti_v1p0'; $lti_dom = new TsugiDOM(file_get_contents ('cc/LTI.xml')); $lti_dom->set_namespace($blti_ns); $lti_dom->replace_text('title', 'New Title'); $lti_dom->delete_tag('description'); $lti_dom->delete_children('custom'); $tag = $lti_dom->get_tag('custom'); // $lti_dom->add_child($tag, 'property', 'SWEET!', array("e"=>"mc-squared")); $lti_dom->add_child('custom', 'property', 'SWEET!', array("e"=>"mc-squared")); echo $lti_dom->saveXML();
Table of Contents
Properties
- $currentNamespace : mixed
- $topicNs : string
Methods
- __construct() : mixed
- add_child() : mixed
- add_child_ns() : mixed
- delete_children() : mixed
- delete_children_ns() : mixed
- delete_tag() : mixed
- delete_tag_ns() : mixed
- dump_dom_levels() : mixed
- dump_dom_list() : mixed
- dump_dom_node() : mixed
- get_element() : mixed
- get_tag() : mixed
- get_tag_ns() : mixed
- prettyXML() : mixed
- replace_text() : mixed
- replace_text_ns() : mixed
- set_namespace() : mixed
- set_text() : mixed
- set_title() : mixed
Properties
$currentNamespace
public
mixed
$currentNamespace
= false
$topicNs
private
string
$topicNs
Methods
__construct()
public
__construct([CC|null $cc = null ]) : mixed
Parameters
- $cc : CC|null = null
-
Cartridge profile; default CC 1.2
add_child()
public
add_child(mixed $entry, mixed $tag[, mixed $text = null ][, mixed $attr = null ]) : mixed
Parameters
- $entry : mixed
- $tag : mixed
- $text : mixed = null
- $attr : mixed = null
add_child_ns()
public
add_child_ns(mixed $ns, mixed $entry, mixed $tag[, mixed $text = null ][, mixed $attr = null ]) : mixed
Parameters
- $ns : mixed
- $entry : mixed
- $tag : mixed
- $text : mixed = null
- $attr : mixed = null
delete_children()
public
delete_children(mixed $tag) : mixed
Parameters
- $tag : mixed
delete_children_ns()
public
delete_children_ns(mixed $ns, mixed $tag) : mixed
Parameters
- $ns : mixed
- $tag : mixed
delete_tag()
public
delete_tag(mixed $tag) : mixed
Parameters
- $tag : mixed
delete_tag_ns()
public
delete_tag_ns(mixed $ns, mixed $tag) : mixed
Parameters
- $ns : mixed
- $tag : mixed
dump_dom_levels()
public
dump_dom_levels(mixed $node[, mixed $level = 0 ]) : mixed
Parameters
- $node : mixed
- $level : mixed = 0
dump_dom_list()
public
dump_dom_list(mixed $node_list) : mixed
Parameters
- $node_list : mixed
dump_dom_node()
public
dump_dom_node(mixed $tag) : mixed
Parameters
- $tag : mixed
get_element()
public
get_element(mixed $ns, mixed $tag) : mixed
Parameters
- $ns : mixed
- $tag : mixed
get_tag()
public
get_tag(mixed $tag[, mixed $key = null ][, mixed $value = null ]) : mixed
Parameters
- $tag : mixed
- $key : mixed = null
- $value : mixed = null
get_tag_ns()
public
get_tag_ns(mixed $ns, mixed $tag[, mixed $key = null ][, mixed $value = null ]) : mixed
Parameters
- $ns : mixed
- $tag : mixed
- $key : mixed = null
- $value : mixed = null
prettyXML()
public
prettyXML() : mixed
replace_text()
public
replace_text(mixed $tag, mixed $text) : mixed
Parameters
- $tag : mixed
- $text : mixed
replace_text_ns()
public
replace_text_ns(mixed $ns, mixed $tag, mixed $text) : mixed
Parameters
- $ns : mixed
- $tag : mixed
- $text : mixed
set_namespace()
public
set_namespace(mixed $new) : mixed
Parameters
- $new : mixed
set_text()
public
set_text(mixed $text) : mixed
Parameters
- $text : mixed
set_title()
public
set_title(mixed $text) : mixed
Parameters
- $text : mixed