/** * Sets the service format * * @param string $format The service format. * * @throws \Ivory\GoogleMap\Exception\ServiceException If the format is not valid. */ public function setFormat($format) { if (!in_array($format, array('json', 'xml'))) { throw ServiceException::invalidServiceFormat(); } $this->format = $format; }