src/ServiceManagement/Internal/Service.php
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);
        }
    }
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);
        }
    }
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 ) ; } }
Serializes the current object.

@param ISerializer $serializer The serializer

@return string

@throws \InvalidArgumentException
Serializes the current object .