public function setFormat($sFormat = null)
    {
        if (null === $sFormat) {
            return $this;
        }

        if (!in_array($sFormat, $this->aValidFormats)) {
            $message = sprintf(
                'The format "%s" is not a valid one, profile format for Gravatar can be: %s',
                $sFormat,
                implode(', ', $this->aValidFormats)
            );

            throw new InvalidProfileFormatException($message);
        }

        $this->sFormat = $sFormat;

        return $this;
    }