public function of($name, Closure $callback = null): Handler
    {
        if ($name instanceof Closure) {
            $callback = $name;
            $name = $this->getDefaultDriver();
        }

        $instance = $this->make($name);

        if ($instance instanceof Handler && ! \is_null($callback)) {
            $callback($instance);
        }

        return $instance;
    }
public function of($name, Closure $callback = null): Handler
    {
        if ($name instanceof Closure) {
            $callback = $name;
            $name = $this->getDefaultDriver();
        }

        $instance = $this->make($name);

        if ($instance instanceof Handler && ! \is_null($callback)) {
            $callback($instance);
        }

        return $instance;
    }
public function of ( $ name , Closure $ callback = null ) : Handler { if ( $ name instanceof Closure ) { $ callback = $ name ; $ name = $ this -> getDefaultDriver ( ) ; } $ instance = $ this -> make ( $ name ) ; if ( $ instance instanceof Handler && ! \ is_null ( $ callback ) ) { $ callback ( $ instance ) ; } return $ instance ; }
Get the selected driver and extend it via callback.

@param  string|\Closure  $name
@param  \Closure|null  $callback

@return \Orchestra\Widget\Handler
Get the selected driver and extend it via callback .