original_string: public function getAttribute($key)
      {
          if ( ! isset($this->attr[$key])) {
              return null;
          }
          $value = $this->attr[$key]['value'];
          if (is_string($value) && ! is_null($this->encode)) {
              // convert charset
              $this->attr[$key]['value'] = $this->encode->convert($value);
          }
  
          return $this->attr[$key];
      }
code: public function getAttribute($key)
      {
          if ( ! isset($this->attr[$key])) {
              return null;
          }
          $value = $this->attr[$key]['value'];
          if (is_string($value) && ! is_null($this->encode)) {
              // convert charset
              $this->attr[$key]['value'] = $this->encode->convert($value);
          }
  
          return $this->attr[$key];
      }
code_tokens: public function getAttribute ( $ key ) { if ( ! isset ( $ this -> attr [ $ key ] ) ) { return null ; } $ value = $ this -> attr [ $ key ] [ 'value' ] ; if ( is_string ( $ value ) && ! is_null ( $ this -> encode ) ) { // convert charset $ this -> attr [ $ key ] [ 'value' ] = $ this -> encode -> convert ( $ value ) ; } return $ this -> attr [ $ key ] ; }
docstring: Returns an attribute by the key
  
  @param string $key
  @return mixed
docstring_tokens: Returns an attribute by the key