original_string: protected function responseAttributes($attributes)
      {
          if(!$attributes) return array();
          
          $ns = 'http://axschema.org/';
  
          $response = array();
          if(isset($this->data['ax'])) {
              $response['ns.ax'] = 'http://openid.net/srv/ax/1.0';
              foreach($attributes as $name => $value) {
                  $alias = strtr($name, '/', '_');
                  $response['ax.type.' . $alias] = $ns . $name;
                  $response['ax.value.' . $alias] = $value;
              }
              return $response;
          }
          
          foreach($attributes as $name => $value) {
              if(!isset($this->ax_to_sreg[$name])) {
                  continue;
              }
              
              $response['sreg.' . $this->ax_to_sreg[$name]] = $value;
          }
          return $response;
      }
code: protected function responseAttributes($attributes)
      {
          if(!$attributes) return array();
          
          $ns = 'http://axschema.org/';
  
          $response = array();
          if(isset($this->data['ax'])) {
              $response['ns.ax'] = 'http://openid.net/srv/ax/1.0';
              foreach($attributes as $name => $value) {
                  $alias = strtr($name, '/', '_');
                  $response['ax.type.' . $alias] = $ns . $name;
                  $response['ax.value.' . $alias] = $value;
              }
              return $response;
          }
          
          foreach($attributes as $name => $value) {
              if(!isset($this->ax_to_sreg[$name])) {
                  continue;
              }
              
              $response['sreg.' . $this->ax_to_sreg[$name]] = $value;
          }
          return $response;
      }
code_tokens: protected function responseAttributes ( $ attributes ) { if ( ! $ attributes ) return array ( ) ; $ ns = 'http://axschema.org/' ; $ response = array ( ) ; if ( isset ( $ this -> data [ 'ax' ] ) ) { $ response [ 'ns.ax' ] = 'http://openid.net/srv/ax/1.0' ; foreach ( $ attributes as $ name => $ value ) { $ alias = strtr ( $ name , '/' , '_' ) ; $ response [ 'ax.type.' . $ alias ] = $ ns . $ name ; $ response [ 'ax.value.' . $ alias ] = $ value ; } return $ response ; } foreach ( $ attributes as $ name => $ value ) { if ( ! isset ( $ this -> ax_to_sreg [ $ name ] ) ) { continue ; } $ response [ 'sreg.' . $ this -> ax_to_sreg [ $ name ] ] = $ value ; } return $ response ; }
docstring: Prepares an array of attributes to send
docstring_tokens: Prepares an array of attributes to send