public function serialize(ISerializer $serializer)
    {
        if ($serializer instanceof XmlSerializer) {
            $arr = $this->toArray();

            return $serializer->serialize(
                $arr,
                $this->_serializationProperties
            );
        } else {
            throw new \InvalidArgumentException(Resources::UNKNOWN_SRILZER_MSG);
        }
    }