public function serializeObject($object, XmlStreamWriter $xmlWriter, string $tagName = null): XmlStreamWriter
    {
        $this->serializerFor($object)->serialize($object, $this, $xmlWriter, $tagName);
        return $xmlWriter;
    }
public function serializeObject($object, XmlStreamWriter $xmlWriter, string $tagName = null): XmlStreamWriter
    {
        $this->serializerFor($object)->serialize($object, $this, $xmlWriter, $tagName);
        return $xmlWriter;
    }
public function serializeObject ( $ object , XmlStreamWriter $ xmlWriter , string $ tagName = null ) : XmlStreamWriter { $ this -> serializerFor ( $ object ) -> serialize ( $ object , $ this , $ xmlWriter , $ tagName ) ; return $ xmlWriter ; }
serializes an object to xml

@param   object                         $object     object to serialize
@param   \stubbles\xml\XmlStreamWriter  $xmlWriter  xml writer to write serialized object into
@param   string                         $tagName    name of the surrounding xml tag
@return  \stubbles\xml\XmlStreamWriter
@since   1.6.0
serializes an object to xml