original_string: public function getProfile($email, $format = null, $secure = null)
      {
          $hash = $this->getHash($email);
  
          $extension = '';
          if (null !== $format) {
              $extension = strtolower($format);
          }
  
          if (null === $secure) {
              $secure = $this->settings['secure'];
          }
  
          $url = ($secure ? 'https://secure' : 'http://www').'.gravatar.com/'.$hash.'.'.$extension;
  
          if ($format === 'qr' || $format === 'json') {
              return $url;
          }
  
          $browser = new \Buzz\Browser();
          if ($format !== 'php') {
              $response = $browser->get($url, $this->headers[$format]);
          } else {
              $response = $browser->get($url);
          }
  
          if ($response->isOk()) {
              if ($format === 'php') {
                  return unserialize($response->getContent());
              } else {
                  return $response->getContent();
              }
          } elseif ($response->isNotFound()) {
              throw new GravatarException($response->getStatusCode().' Error: There is no profile associated with this email address.');
          } else {
              throw new GravatarException($response->getStatusCode().' Error: There was an error trying to fetch this profile.');
          }
  
          return;
      }
code: public function getProfile($email, $format = null, $secure = null)
      {
          $hash = $this->getHash($email);
  
          $extension = '';
          if (null !== $format) {
              $extension = strtolower($format);
          }
  
          if (null === $secure) {
              $secure = $this->settings['secure'];
          }
  
          $url = ($secure ? 'https://secure' : 'http://www').'.gravatar.com/'.$hash.'.'.$extension;
  
          if ($format === 'qr' || $format === 'json') {
              return $url;
          }
  
          $browser = new \Buzz\Browser();
          if ($format !== 'php') {
              $response = $browser->get($url, $this->headers[$format]);
          } else {
              $response = $browser->get($url);
          }
  
          if ($response->isOk()) {
              if ($format === 'php') {
                  return unserialize($response->getContent());
              } else {
                  return $response->getContent();
              }
          } elseif ($response->isNotFound()) {
              throw new GravatarException($response->getStatusCode().' Error: There is no profile associated with this email address.');
          } else {
              throw new GravatarException($response->getStatusCode().' Error: There was an error trying to fetch this profile.');
          }
  
          return;
      }
code_tokens: public function getProfile ( $ email , $ format = null , $ secure = null ) { $ hash = $ this -> getHash ( $ email ) ; $ extension = '' ; if ( null !== $ format ) { $ extension = strtolower ( $ format ) ; } if ( null === $ secure ) { $ secure = $ this -> settings [ 'secure' ] ; } $ url = ( $ secure ? 'https://secure' : 'http://www' ) . '.gravatar.com/' . $ hash . '.' . $ extension ; if ( $ format === 'qr' || $ format === 'json' ) { return $ url ; } $ browser = new \ Buzz \ Browser ( ) ; if ( $ format !== 'php' ) { $ response = $ browser -> get ( $ url , $ this -> headers [ $ format ] ) ; } else { $ response = $ browser -> get ( $ url ) ; } if ( $ response -> isOk ( ) ) { if ( $ format === 'php' ) { return unserialize ( $ response -> getContent ( ) ) ; } else { return $ response -> getContent ( ) ; } } elseif ( $ response -> isNotFound ( ) ) { throw new GravatarException ( $ response -> getStatusCode ( ) . ' Error: There is no profile associated with this email address.' ) ; } else { throw new GravatarException ( $ response -> getStatusCode ( ) . ' Error: There was an error trying to fetch this profile.' ) ; } return ; }
docstring: Returns gravatar profile information for a given email address
  
  Valid Formats include: json, xml, php, vcf, qr
  If a format is not specified, the profile will be returned in hCard format
  
  Due to the way the gravatar api's work, json and qr formats return a url
  string for use in img and script tags
  
  @param  String       $email
  @param  String       $format
  @return Array|String
docstring_tokens: Returns gravatar profile information for a given email address