original_string: public function get_and_erase_attributes($classname) {
          $attributes = $this->attributes;
          $this->attributes = array();
          if (empty($attributes['class'])) {
              $attributes['class'] = '';
          }
          $attributes['class'] = $classname . ' '. $attributes['class'];
          return $attributes;
      }
code: public function get_and_erase_attributes($classname) {
          $attributes = $this->attributes;
          $this->attributes = array();
          if (empty($attributes['class'])) {
              $attributes['class'] = '';
          }
          $attributes['class'] = $classname . ' '. $attributes['class'];
          return $attributes;
      }
code_tokens: public function get_and_erase_attributes ( $ classname ) { $ attributes = $ this -> attributes ; $ this -> attributes = array ( ) ; if ( empty ( $ attributes [ 'class' ] ) ) { $ attributes [ 'class' ] = '' ; } $ attributes [ 'class' ] = $ classname . ' ' . $ attributes [ 'class' ] ; return $ attributes ; }
docstring: Return all attributes and erases them so they are not applied again
  
  @param string $classname adds additional class name to the beginning of $attributes['class']
  @return array
docstring_tokens: Return all attributes and erases them so they are not applied again