/** * Override <mxObjectCodec.decodeChild>. */ function decodeChild($dec, $child, $obj) { if ($child->nodeName == "root") { $this->decodeRoot($dec, $child, $obj); } else { parent::decodeChild($dec, $child, $obj); } }
/** * Class: mxStylesheetCodec * * Codec for <mxStylesheets>. This class is created and registered * dynamically at load time and used implicitely via <mxCodec> * and the <mxCodecRegistry>. * * Constructor: mxObjectCodec * * Constructs a new codec for the specified template object. * The variables in the optional exclude array are ignored by * the codec. Variables in the optional idrefs array are * turned into references in the XML. The optional mapping * may be used to map from variable names to XML attributes. * * Parameters: * * template - Prototypical instance of the object to be * encoded/decoded. * exclude - Optional array of fieldnames to be ignored. * idrefs - Optional array of fieldnames to be converted to/from * references. * mapping - Optional mapping from field- to attributenames. */ function mxStylesheetCodec($template) { parent::mxObjectCodec($template); }
/** * Override <mxObjectCodec.isExcluded>. */ function isExcluded($obj, $attr, $value, $isWrite) { return parent::isExcluded($obj, $attr, $value, $isWrite) || $isWrite && $attr == "value" && is_object($value) && get_class($value) == "DOMElement"; }