xml.php
public function paintSignal($type, $payload)
    {
        parent::paintSignal($type, $payload);
        print $this->getIndent(1);
        print '<' . $this->namespace . "signal type=\"$type\">";
        print '<![CDATA[' . serialize($payload) . ']]>';
        print '</' . $this->namespace . "signal>\n";
    }
public function paintSignal($type, $payload)
    {
        parent::paintSignal($type, $payload);
        print $this->getIndent(1);
        print '<' . $this->namespace . "signal type=\"$type\">";
        print '<![CDATA[' . serialize($payload) . ']]>';
        print '</' . $this->namespace . "signal>\n";
    }
Serialises the event object.

@param string $type        Event type as text.
@param mixed $payload      Message or object.