<?php
 class FormControlItemVO implements MotoDomObjectInterface { public $x; public $y; public $width; public $height; public $type = ""; public function __construct(DOMNode $parent = null) { if (!empty($parent)) { $this->loadDomElement($parent); } } public function loadDomElement(DOMNode $parent) { $this->type = (string) $parent->getAttribute('type'); $this->x = (int) $parent->getAttribute('x'); $this->y = (int) $parent->getAttribute('y'); $this->width = (int) $parent->getAttribute('width'); $this->height = (int) $parent->getAttribute('height'); return $this; } public function saveDomElement(DOMNode $parent) { $parent->setAttribute('type', (string) $this->type); $parent->setAttribute('x', (string) $this->x); $parent->setAttribute('y', (string) $this->y); $parent->setAttribute('width', (string) $this->width); $parent->setAttribute('height', (string) $this->height); return $parent; } public static function findAll(DOMNode $context) { return MotoXML::findByXPath(".//item", $context, get_class()); } } ?>