public function getIconString($icon, $class = '', $width = '', $height = '')
    {
        $string = $this->loadFile(__DIR__.'/../../resources/assets/icons/'.$icon.'.svg');
        $string = substr_replace($string, ' class="'.$class.'"', 4, 0);

        if ($width) {
            $string = substr_replace($string, 'width="'.$width.'"', strpos($string, 'width='), 10);
            $string = substr_replace($string, 'height="'.$height.'"', strpos($string, 'height='), 11);
        }

        return $string;
    }
public function getIconString($icon, $class = '', $width = '', $height = '')
    {
        $string = $this->loadFile(__DIR__.'/../../resources/assets/icons/'.$icon.'.svg');
        $string = substr_replace($string, ' class="'.$class.'"', 4, 0);

        if ($width) {
            $string = substr_replace($string, 'width="'.$width.'"', strpos($string, 'width='), 10);
            $string = substr_replace($string, 'height="'.$height.'"', strpos($string, 'height='), 11);
        }

        return $string;
    }
public function getIconString ( $ icon , $ class = '' , $ width = '' , $ height = '' ) { $ string = $ this -> loadFile ( __DIR__ . '/../../resources/assets/icons/' . $ icon . '.svg' ) ; $ string = substr_replace ( $ string , ' class="' . $ class . '"' , 4 , 0 ) ; if ( $ width ) { $ string = substr_replace ( $ string , 'width="' . $ width . '"' , strpos ( $ string , 'width=' ) , 10 ) ; $ string = substr_replace ( $ string , 'height="' . $ height . '"' , strpos ( $ string , 'height=' ) , 11 ) ; } return $ string ; }
The icon svg as a string.

@param  string  $icon
@param  string  $class
@param  int  $width
@param  int  $height
@return string
The icon svg as a string .