public function setExtension($sExtension = null)
    {
        if (null === $sExtension) {
            return $this;
        }

        if (!in_array($sExtension, $this->aValidExtensions)) {
            $message = sprintf(
                'The extension "%s" is not a valid one, extension image for Gravatar can be: %s',
                $sExtension,
                implode(', ', $this->aValidExtensions)
            );

            throw new InvalidImageExtensionException($message);
        }

        $this->sExtension = $sExtension;

        return $this;
    }
public function setExtension($sExtension = null)
    {
        if (null === $sExtension) {
            return $this;
        }

        if (!in_array($sExtension, $this->aValidExtensions)) {
            $message = sprintf(
                'The extension "%s" is not a valid one, extension image for Gravatar can be: %s',
                $sExtension,
                implode(', ', $this->aValidExtensions)
            );

            throw new InvalidImageExtensionException($message);
        }

        $this->sExtension = $sExtension;

        return $this;
    }
public function setExtension ( $ sExtension = null ) { if ( null === $ sExtension ) { return $ this ; } if ( ! in_array ( $ sExtension , $ this -> aValidExtensions ) ) { $ message = sprintf ( 'The extension "%s" is not a valid one, extension image for Gravatar can be: %s' , $ sExtension , implode ( ', ' , $ this -> aValidExtensions ) ) ; throw new InvalidImageExtensionException ( $ message ) ; } $ this -> sExtension = $ sExtension ; return $ this ; }
Set the avatar extension to use.

@param string $sExtension The avatar extension to use.
@throws InvalidImageExtensionException
@return \forxer\Gravatar\Image The current Gravatar Image instance.
Set the avatar extension to use .