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;
    }
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;
    }
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 ; }
Set the profile format to use.

@param string $sFormat The profile format to use
@throws \InvalidArgumentException
@return \forxer\Gravatar\Profile The current Profile instance
Set the profile format to use .