예제 #1
0
 /**
  * Specifies, what node types can be children of XML tags.
  *
  * @internal
  * @param Opt_Xml_Node $node
  */
 protected function _testNode(Opt_Xml_Node $node)
 {
     if ($node->getType() != 'Opt_Xml_Element' && $node->getType() != 'Opt_Xml_Text' && $node->getType() != 'Opt_Xml_Comment') {
         throw new Opt_APIInvalidNodeType_Exception('Opt_Xml_Element', $node->getType());
     }
 }
예제 #2
0
 /**
  * Tests, if the specified node can be a child of root.
  * @param Opt_Xml_Node $node The node to test.
  */
 protected function _testNode(Opt_Xml_Node $node)
 {
     if ($node->getType() == 'Opt_Xml_Expression' && $node->getType() == 'Opt_Xml_Cdata') {
         throw new Opt_APIInvalidNodeType_Exception('Opt_Xml_Root', $node->getType());
     }
 }