src/AbstractMessage.php
final public function toArray()
    {
        if (null === self::$serializer) {
            self::$serializer = new PhpArraySerializer();
        }
        return self::$serializer->serialize($this);
    }
final public function toArray()
    {
        if (null === self::$serializer) {
            self::$serializer = new PhpArraySerializer();
        }
        return self::$serializer->serialize($this);
    }
{@inheritdoc}