static function create($params,$return=false)
    {
        $class = get_called_class();
        $component = new $class($params);
        if ($return) {
            ob_start();
            $component->render();
            return ob_get_clean();
        } else {
            $component->render();
        }
    }
static function create($params,$return=false)
    {
        $class = get_called_class();
        $component = new $class($params);
        if ($return) {
            ob_start();
            $component->render();
            return ob_get_clean();
        } else {
            $component->render();
        }
    }
static function create ( $ params , $ return = false ) { $ class = get_called_class ( ) ; $ component = new $ class ( $ params ) ; if ( $ return ) { ob_start ( ) ; $ component -> render ( ) ; return ob_get_clean ( ) ; } else { $ component -> render ( ) ; } }
Create widget object

@param array $params The settings of widget
@param bool  $return Set to true if you want to get html rather than
rendering widget directly

@return string Return html string if $return is set to true
Create widget object