depage-xmldb v2.3.1
XML documents in a relational database
Loading...
Searching...
No Matches
DoctypeInterface.php
Go to the documentation of this file.
1<?php
2
4
16{
23 public function getPermissions();
31 public function getValidParents();
37 public function getAvailableNodes();
44 public function getPreserveWhitespace();
53 public function getNewNodeFor($name);
54
63 public function isAllowedIn($nodeName, $targetNodeName);
72 public function isAllowedAdd($nodeName, $targetId);
81 public function isAllowedCopy($nodeId, $targetId);
90 public function isAllowedMove($nodeId, $targetId);
98 public function isAllowedDelete($nodeId);
99
105 public function onDocumentChange();
117 public function onAddNode(\DomNode $node, $targetId, $targetIndex, $extras);
126 public function onCopyNode($nodeId, $copyId);
135 public function onMoveNode($nodeId, $oldParentId);
144 public function onDeleteNode($nodeId, $parentId);
155 public function onSetAttribute($nodeId, $attrName, $oldVal, $newVal);
156
164 public function testDocument($xml);
173 public function testDocumentForHistory($xml);
174}
Interface of the doctype handler of a document.
isAllowedDelete($nodeId)
checks whether a node may be deleted
isAllowedAdd($nodeName, $targetId)
checks whether a node may be added to a target node
getPreserveWhitespace()
gets the names of the nodes whose whitespace is not stripped while the document is saved
getNewNodeFor($name)
builds the node that is created by Document\addNodeByName()
onCopyNode($nodeId, $copyId)
called when a node is copied
getValidParents()
gets the names of the nodes a node may be placed in, indexed by the name of the node; the key "*" is ...
isAllowedCopy($nodeId, $targetId)
checks whether a node may be copied to a target node
testDocumentForHistory($xml)
called when a version of the document is written to the history; the document may be changed here
testDocument($xml)
called when a document is read; the document may be changed here
getAvailableNodes()
gets the nodes that may be created by name, indexed by their name
isAllowedMove($nodeId, $targetId)
checks whether a node may be moved to a target node
getPermissions()
gets the rules of the document
onMoveNode($nodeId, $oldParentId)
called when a node is moved
onAddNode(\DomNode $node, $targetId, $targetIndex, $extras)
called when a node is added to the document
onSetAttribute($nodeId, $attrName, $oldVal, $newVal)
called when an attribute of a node is changed
onDocumentChange()
called after the document has been changed and committed
isAllowedIn($nodeName, $targetNodeName)
checks whether a node may be placed in another node
onDeleteNode($nodeId, $parentId)
called when a node is deleted