src/AbstractParent.php 1 location
|
@@ 45-54 (lines=10) @@
|
| 42 |
|
* @param AbstractElement $node |
| 43 |
|
* @throws \Exception |
| 44 |
|
*/ |
| 45 |
|
protected function checkNode(AbstractElement $node) |
| 46 |
|
{ |
| 47 |
|
if (null === $node->getName()) { |
| 48 |
|
throw new \Exception("Use the create<nodetype>Node on document!"); |
| 49 |
|
} |
| 50 |
|
|
| 51 |
|
if (null === $node->getDocument() || $this->getDocument() !== $node->getDocument()) { |
| 52 |
|
throw new \Exception("Use the create<nodetype>Node on document!"); |
| 53 |
|
} |
| 54 |
|
} |
| 55 |
|
|
| 56 |
|
/** |
| 57 |
|
* @param AbstractElement $node |
src/ObjectNode.php 1 location
|
@@ 49-58 (lines=10) @@
|
| 46 |
|
* @return void |
| 47 |
|
* @throws \Exception |
| 48 |
|
*/ |
| 49 |
|
protected function checkAttribute(AttributeNode $node) |
| 50 |
|
{ |
| 51 |
|
if (null === $node->getName()) { |
| 52 |
|
throw new \Exception("Use the createAttributeNode on document!"); |
| 53 |
|
} |
| 54 |
|
|
| 55 |
|
if (null === $node->getDocument() || $this->getDocument() !== $node->getDocument()) { |
| 56 |
|
throw new \Exception("Use the createAttributeNode on document!"); |
| 57 |
|
} |
| 58 |
|
} |
| 59 |
|
|
| 60 |
|
/** |
| 61 |
|
* @param AttributeNode $node |