src/XQueue/Maileon/API/Mailings/Attachment.php
function fromXML($xmlElement)
    {
        if (isset($xmlElement->id)) { $this->id = (int)$xmlElement->id; }
        if (isset($xmlElement->filename)) { $this->filename = (string)$xmlElement->filename; }
        if (isset($xmlElement->sizekb)) { $this->sizekb = (int)$xmlElement->sizekb; }
        if (isset($xmlElement->mime_type)) { $this->mime_type = (string)$xmlElement->mime_type; }
        if (isset($xmlElement->diagnosis)) { $this->diagnosis = (string)$xmlElement->diagnosis; }
        if (isset($xmlElement->created)) { $this->created = (string)$xmlElement->created; }
        if (isset($xmlElement->updated)) { $this->updated = (string)$xmlElement->updated; }
    }
function fromXML($xmlElement)
    {
        if (isset($xmlElement->id)) { $this->id = (int)$xmlElement->id; }
        if (isset($xmlElement->filename)) { $this->filename = (string)$xmlElement->filename; }
        if (isset($xmlElement->sizekb)) { $this->sizekb = (int)$xmlElement->sizekb; }
        if (isset($xmlElement->mime_type)) { $this->mime_type = (string)$xmlElement->mime_type; }
        if (isset($xmlElement->diagnosis)) { $this->diagnosis = (string)$xmlElement->diagnosis; }
        if (isset($xmlElement->created)) { $this->created = (string)$xmlElement->created; }
        if (isset($xmlElement->updated)) { $this->updated = (string)$xmlElement->updated; }
    }
Initialization of the attachment from a simple xml element.

@param SimpleXMLElement $xmlElement
The xml element that is used to parse the attachment from.