ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
Public Member Functions | |
__construct () | |
Constructor initilize netsed-set variables public. More... | |
startElement ($parser, $name, $attrs) | |
Method is called, at an introductory TAG private. More... | |
endElement ($parser, $name) | |
method called at a closing tag private More... | |
import ($xmldata, $obj_id, $obj_type) | |
Import-Function. More... | |
setParameterModifier (&$a_object, $a_method) | |
export ($obj_id, $type) | |
Export-Function. More... | |
init ($obj_id, $obj_type) | |
initilialize Nested-Set-Structur More... | |
getTagName () | |
find first tag-name More... | |
setTagName ($tagName) | |
set tag-name More... | |
getTagValue () | |
get tag content More... | |
setTagValue ($value) | |
set tag-content More... | |
getXpathNodes (&$doc, $qry) | |
get node in dom-structure More... | |
initDom () | |
inits dom-object from given xml-content More... | |
addXMLNode ($xPath, $xml, $index=0) | |
parse XML code and add it to a given DOM object as a new node More... | |
getFirstDomContent ($xPath) | |
returns first content of this node More... | |
deleteDomNode ($xPath, $name, $index=0) | |
deletes node More... | |
addDomNode ($xPath, $name, $value="", $attributes="", $index=0) | |
adds node to DOM-Structure More... | |
clean (&$meta) | |
updateDomNode ($xPath, $meta, $no=0) | |
updates dom node More... | |
getDomContent ($xPath, $name="", $index=0) | |
returns all contents of this node More... | |
replaceDomContent ($xPath, $name="", $index=0, $newNode) | |
updates content of this node More... | |
replace_content (&$node, &$new_content) | |
Replace node contents. More... | |
updateDomContent ($xPath, $name="", $index=0, $newNode) | |
updates content of this node More... | |
getFirstDomNode ($xPath) | |
first dom-node More... | |
updateFromDom () | |
imports new xml-data from dom into nested set public More... | |
deleteAllDbData () | |
deletes current db-data of $this->obj_id and $this->obj_type private More... | |
_deleteAllChildMetaData ($a_ids) | |
Delete meta data of a content object (pages, chapters) public. More... | |
_getAllChildIds ($a_obj_id) | |
Get all child ids of a content object public. More... | |
Data Fields | |
$db | |
Datenbank-handle. More... | |
$LEFT = 0 | |
Left and right edge tags. More... | |
$RIGHT = 0 | |
$DEPTH = 0 | |
Nesting level of the tags. More... | |
$obj_id | |
book-Obj-ID More... | |
$obj_type | |
The type of the data to those this entry belongs. More... | |
$xml_parser | |
SAX-Parser-Handle. More... | |
$lastTag = "" | |
last Tag-Name found More... | |
$ilias | |
$dom | |
Definition at line 36 of file class.ilNestedSetXML.php.
ilNestedSetXML::__construct | ( | ) |
Constructor initilize netsed-set variables public.
Definition at line 98 of file class.ilNestedSetXML.php.
ilNestedSetXML::_deleteAllChildMetaData | ( | $a_ids | ) |
Delete meta data of a content object (pages, chapters) public.
array | of child ids |
Definition at line 1239 of file class.ilNestedSetXML.php.
References $ilBench, $ilDB, $in, $query, $res, $row, ilDBConstants\FETCHMODE_OBJECT, and ilUtil\quoteArray().
ilNestedSetXML::_getAllChildIds | ( | $a_obj_id | ) |
Get all child ids of a content object public.
int | obj_id |
Definition at line 1278 of file class.ilNestedSetXML.php.
References $ilDB, $query, $res, $row, array, and ilDBConstants\FETCHMODE_OBJECT.
ilNestedSetXML::addDomNode | ( | $xPath, | |
$name, | |||
$value = "" , |
|||
$attributes = "" , |
|||
$index = 0 |
|||
) |
adds node to DOM-Structure
string | xPath |
string | name |
string | value |
array | attributes |
integer | index |
Definition at line 686 of file class.ilNestedSetXML.php.
References $attributes, $i, $index, $name, and getXpathNodes().
ilNestedSetXML::addXMLNode | ( | $xPath, | |
$xml, | |||
$index = 0 |
|||
) |
parse XML code and add it to a given DOM object as a new node
string | xPath path |
string | xml xml to add |
integer | index index to add |
Definition at line 589 of file class.ilNestedSetXML.php.
References $index, $xml, and getXpathNodes().
Referenced by updateDomNode().
ilNestedSetXML::clean | ( | & | $meta | ) |
Definition at line 706 of file class.ilNestedSetXML.php.
References $key.
Referenced by startElement(), and updateDomNode().
ilNestedSetXML::deleteAllDbData | ( | ) |
deletes current db-data of $this->obj_id and $this->obj_type private
Definition at line 1217 of file class.ilNestedSetXML.php.
References $ilBench, $ilDB, $res, $row, and ilDBConstants\FETCHMODE_ASSOC.
Referenced by import(), and updateFromDom().
ilNestedSetXML::deleteDomNode | ( | $xPath, | |
$name, | |||
$index = 0 |
|||
) |
deletes node
string | xPath path |
string | name name |
integer | index index |
Definition at line 641 of file class.ilNestedSetXML.php.
References $i, $index, $name, and getXpathNodes().
ilNestedSetXML::endElement | ( | $parser, | |
$name | |||
) |
method called at a closing tag private
parser | parser xml-parser-handle |
string | name name of the closing tag |
Definition at line 211 of file class.ilNestedSetXML.php.
Referenced by startElement().
ilNestedSetXML::export | ( | $obj_id, | |
$type | |||
) |
Export-Function.
creates xml out of nested-set-structure
int | obj_id book-id |
string | type Object-Type of XML-Struktur |
public
Definition at line 307 of file class.ilNestedSetXML.php.
References $i, $ilDB, $query, $result, $row, $type, $xml, and ilDBConstants\FETCHMODE_ASSOC.
Referenced by initDom().
ilNestedSetXML::getDomContent | ( | $xPath, | |
$name = "" , |
|||
$index = 0 |
|||
) |
returns all contents of this node
string | xPath |
string | name |
integer | index |
Definition at line 1070 of file class.ilNestedSetXML.php.
References $i, $index, $name, and getXpathNodes().
ilNestedSetXML::getFirstDomContent | ( | $xPath | ) |
returns first content of this node
string | xPath path |
Definition at line 613 of file class.ilNestedSetXML.php.
References getXpathNodes().
ilNestedSetXML::getFirstDomNode | ( | $xPath | ) |
first dom-node
string | xPath path |
Definition at line 1196 of file class.ilNestedSetXML.php.
References getXpathNodes().
ilNestedSetXML::getTagName | ( | ) |
find first tag-name
public
Definition at line 415 of file class.ilNestedSetXML.php.
References $ilDB, $query, $result, $row, and ilDBConstants\FETCHMODE_ASSOC.
ilNestedSetXML::getTagValue | ( | ) |
get tag content
Definition at line 458 of file class.ilNestedSetXML.php.
References $ilDB, $obj_id, $obj_type, $query, $result, $row, $xml, array, and ilDBConstants\FETCHMODE_ASSOC.
ilNestedSetXML::getXpathNodes | ( | & | $doc, |
$qry | |||
) |
get node in dom-structure
object | doc |
string | qry path to node |
Definition at line 532 of file class.ilNestedSetXML.php.
References $result.
Referenced by addDomNode(), addXMLNode(), deleteDomNode(), getDomContent(), getFirstDomContent(), getFirstDomNode(), replaceDomContent(), updateDomContent(), and updateDomNode().
ilNestedSetXML::import | ( | $xmldata, | |
$obj_id, | |||
$obj_type | |||
) |
Import-Function.
String | xmldata xml-structure |
int | obj_id book-ID |
string | obj_type Object-Type |
public
drop temporary table
create new temp-Table
initialize XML-Parser
transfer nested-set-structure ito table and drop temp-Table
Definition at line 228 of file class.ilNestedSetXML.php.
References $obj_id, $obj_type, and deleteAllDbData().
ilNestedSetXML::init | ( | $obj_id, | |
$obj_type | |||
) |
initilialize Nested-Set-Structur
integer | obj_id object-id |
string | obj_type type of object public |
Definition at line 389 of file class.ilNestedSetXML.php.
References $ilDB, $obj_id, $obj_type, $query, $result, $row, and ilDBConstants\FETCHMODE_ASSOC.
ilNestedSetXML::initDom | ( | ) |
inits dom-object from given xml-content
Definition at line 552 of file class.ilNestedSetXML.php.
References $xml, domxml_open_mem(), and export().
ilNestedSetXML::replace_content | ( | & | $node, |
& | $new_content | ||
) |
Replace node contents.
Needed as a workaround for bug/feature of set_content This version puts the content as the first child of the new node. If you need it somewhere else, simply move $newnode->set_content() where you want it.
Definition at line 1141 of file class.ilNestedSetXML.php.
Referenced by replaceDomContent().
ilNestedSetXML::replaceDomContent | ( | $xPath, | |
$name = "" , |
|||
$index = 0 , |
|||
$newNode | |||
) |
updates content of this node
string | xPath |
string | name |
integer | index |
array | newNode public |
Definition at line 1108 of file class.ilNestedSetXML.php.
References $i, $index, $key, $name, getXpathNodes(), and replace_content().
ilNestedSetXML::setParameterModifier | ( | & | $a_object, |
$a_method | |||
) |
obj | a_object |
String | a_method Function-Name |
Definition at line 290 of file class.ilNestedSetXML.php.
ilNestedSetXML::setTagName | ( | $tagName | ) |
set tag-name
string | tagName name of tag to be changed |
public
Definition at line 436 of file class.ilNestedSetXML.php.
References $ilDB, $query, $result, $row, and ilDBConstants\FETCHMODE_ASSOC.
ilNestedSetXML::setTagValue | ( | $value | ) |
set tag-content
string | value public |
add new
Definition at line 494 of file class.ilNestedSetXML.php.
References $ilDB, $query, $result, $row, array, and ilDBConstants\FETCHMODE_ASSOC.
ilNestedSetXML::startElement | ( | $parser, | |
$name, | |||
$attrs | |||
) |
Method is called, at an introductory TAG private.
parser | parser xml-parser-handle |
string | name the tag-name |
array | attrs assoziativ-array of all attributes inside the tag |
Insert Tag-Name
Definition at line 123 of file class.ilNestedSetXML.php.
References $data, $ilDB, $key, $name, $parser, $r, $row, array, clean(), and endElement().
ilNestedSetXML::updateDomContent | ( | $xPath, | |
$name = "" , |
|||
$index = 0 , |
|||
$newNode | |||
) |
updates content of this node
string | xPath |
string | name |
integer | index |
array | newNode public |
Definition at line 1166 of file class.ilNestedSetXML.php.
References $i, $index, $key, $name, and getXpathNodes().
ilNestedSetXML::updateDomNode | ( | $xPath, | |
$meta, | |||
$no = 0 |
|||
) |
updates dom node
string | xPath |
string | meta |
integer | no public |
Definition at line 730 of file class.ilNestedSetXML.php.
References $i, $xml, addXMLNode(), clean(), getXpathNodes(), and ilUtil\stripSlashes().
ilNestedSetXML::updateFromDom | ( | ) |
imports new xml-data from dom into nested set public
Definition at line 1206 of file class.ilNestedSetXML.php.
References $obj_id, $obj_type, $xml, and deleteAllDbData().
ilNestedSetXML::$db |
Datenbank-handle.
Definition at line 43 of file class.ilNestedSetXML.php.
ilNestedSetXML::$DEPTH = 0 |
Nesting level of the tags.
stored in database
Definition at line 55 of file class.ilNestedSetXML.php.
ilNestedSetXML::$dom |
Definition at line 89 of file class.ilNestedSetXML.php.
ilNestedSetXML::$ilias |
Definition at line 82 of file class.ilNestedSetXML.php.
Referenced by __construct().
ilNestedSetXML::$lastTag = "" |
last Tag-Name found
Definition at line 75 of file class.ilNestedSetXML.php.
ilNestedSetXML::$LEFT = 0 |
Left and right edge tags.
Definition at line 48 of file class.ilNestedSetXML.php.
ilNestedSetXML::$obj_id |
book-Obj-ID
Definition at line 60 of file class.ilNestedSetXML.php.
Referenced by getTagValue(), import(), init(), and updateFromDom().
ilNestedSetXML::$obj_type |
The type of the data to those this entry belongs.
Definition at line 65 of file class.ilNestedSetXML.php.
Referenced by getTagValue(), import(), init(), and updateFromDom().
ilNestedSetXML::$RIGHT = 0 |
Definition at line 49 of file class.ilNestedSetXML.php.
ilNestedSetXML::$xml_parser |
SAX-Parser-Handle.
Definition at line 70 of file class.ilNestedSetXML.php.