src/Gravatar.php
public function avatar(string $email, array $options = [], ?bool $secure = null, bool $validateOptions = false): string
    {
        $url = 'avatar/'.$this->createEmailHash($email);

        $options = array_merge($this->defaults, array_filter($options));

        if ($validateOptions) {
            $this->validateOptions($options);
        }

        if (!empty($options)) {
            $url .= '?'.http_build_query($options);
        }

        return $this->buildUrl($url, $secure);
    }
public function avatar(string $email, array $options = [], ?bool $secure = null, bool $validateOptions = false): string
    {
        $url = 'avatar/'.$this->createEmailHash($email);

        $options = array_merge($this->defaults, array_filter($options));

        if ($validateOptions) {
            $this->validateOptions($options);
        }

        if (!empty($options)) {
            $url .= '?'.http_build_query($options);
        }

        return $this->buildUrl($url, $secure);
    }
public function avatar ( string $ email , array $ options = [ ] , ? bool $ secure = null , bool $ validateOptions = false ) : string { $ url = 'avatar/' . $ this -> createEmailHash ( $ email ) ; $ options = array_merge ( $ this -> defaults , array_filter ( $ options ) ) ; if ( $ validateOptions ) { $ this -> validateOptions ( $ options ) ; } if ( ! empty ( $ options ) ) { $ url .= '?' . http_build_query ( $ options ) ; } return $ this -> buildUrl ( $ url , $ secure ) ; }
Returns an Avatar URL.
Returns an Avatar URL .