<?
$out = '<a ';
  $out .= 'class="btn ' . $this -> params['class'] . '" ';
  
    if ( $this -> params['style'] )
      $out .= 'style="' . $this -> params['style'] . '" ';
    
    if ( $this -> params['js'] )
      $out .= 'onclick="' . htmlspecialchars( $this -> params['js'] ) . '" ';
    
    if ( $this -> params['url'] )
      $out .= 'href="' . htmlspecialchars( $this -> params['url'] ) . '" ';
    
    if ( $this -> params['id'] )
      $out .= 'id="' . $this -> params['id'] . '" ';
    
    if ( $this -> params['title'] )
      $out .= 'title="' . htmlspecialchars( $this -> params['title'] ) . '" ';
    
    if ( is_array( $this -> params['attr'] ) ) foreach ( $this -> params['attr'] as $key => $val )
      $out .= $key . '="' . $val . '" ';
$out .= '>';
  if ( $this -> params['icon'] )
    $out .= '<i class="fa ' . $this -> params['icon'] . '"></i>';
  $out .= $this -> params['text'];
$out .= '</a>';

echo $out;