<?php
 class ModuleOptionVO implements MotoDomObjectInterface { public $id; public $value; public function __construct(DOMNode $parent = null) { if (!empty($parent)) { $this->loadDomElement($parent); } } public function loadDomElement(DOMNode $parent) { $this->id = (string) $parent->getAttribute('id'); $nodeValue = $parent->getElementsByTagName('value')->item(0); if (!is_null($nodeValue)) $this->value = (string) $nodeValue->nodeValue; return $this; } public function saveDomElement(DOMNode $parent) { $parent->setAttribute('id', (string) $this->id); $parent->appendChild(new DOMElement('value')) ->appendChild($parent->ownerDocument->createCDATASection($this->value)); return $parent; } public function remove() { } public static function findAll(DOMNode $context) { return MotoXML::findByXPath("//option", $context, get_class()); } } ?>