public static function widget($config=[])
    {
        // Cache considering (Lost resetting pattern)
        // if (!self::$_instance) {
        //     $widget = get_called_class();
        //     self::$_instance = new $widget;
        // }
        
        // Create an instance for each call
        $widgetClass = get_called_class();
        self::$_instance = new $widgetClass;

        // Configuration for each call
        foreach ($config as $property => $value) {
            
            self::$_instance->$property = $value;
        }
        
        return self::$_instance->run();
    }
public static function widget($config=[])
    {
        // Cache considering (Lost resetting pattern)
        // if (!self::$_instance) {
        //     $widget = get_called_class();
        //     self::$_instance = new $widget;
        // }
        
        // Create an instance for each call
        $widgetClass = get_called_class();
        self::$_instance = new $widgetClass;

        // Configuration for each call
        foreach ($config as $property => $value) {
            
            self::$_instance->$property = $value;
        }
        
        return self::$_instance->run();
    }
public static function widget ( $ config = [ ] ) { // Cache considering (Lost resetting pattern)
 // if (!self::$_instance) {
 //     $widget = get_called_class();
 //     self::$_instance = new $widget;
 // }
 // Create an instance for each call
 $ widgetClass = get_called_class ( ) ; self :: $ _instance = new $ widgetClass ; // Configuration for each call
 foreach ( $ config as $ property => $ value ) { self :: $ _instance -> $ property = $ value ; } return self :: $ _instance -> run ( ) ; }
Creates a widget instance and runs it.
The widget rendering result is returned by this method.

@param array $config name-value pairs that will be used to initialize the object properties
@return string the rendering result of the widget.
@throws \Exception
Creates a widget instance and runs it . The widget rendering result is returned by this method .