src/XQueue/Maileon/API/Mailings/Mailing.php
function fromXML($xmlElement)
    {
        if (isset($xmlElement->id)) $this->id = $xmlElement->id;

        if (isset($xmlElement->fields)) {
            $this->fields = array();
            foreach ($xmlElement->fields->children() as $field) {
                $this->fields[trim($field->name)] = (string)$field->value; // The trim is required to make a safer string from the object
            }
        }
    }
function fromXML($xmlElement)
    {
        if (isset($xmlElement->id)) $this->id = $xmlElement->id;

        if (isset($xmlElement->fields)) {
            $this->fields = array();
            foreach ($xmlElement->fields->children() as $field) {
                $this->fields[trim($field->name)] = (string)$field->value; // The trim is required to make a safer string from the object
            }
        }
    }
function fromXML ( $ xmlElement ) { if ( isset ( $ xmlElement -> id ) ) $ this -> id = $ xmlElement -> id ; if ( isset ( $ xmlElement -> fields ) ) { $ this -> fields = array ( ) ; foreach ( $ xmlElement -> fields -> children ( ) as $ field ) { $ this -> fields [ trim ( $ field -> name ) ] = ( string ) $ field -> value ; // The trim is required to make a safer string from the object } } }
Initialization of the mailing from a simple xml element.

@param SimpleXMLElement $xmlElement
The xml element that is used to parse the mailing from.
Initialization of the mailing from a simple xml element .