public function extend(string $name, callable $resolver)
    {
        if ($resolver instanceof Closure) {
            $this->extensions[$name] = $resolver->bindTo($this, $this);
        } else {
            $this->extensions[$name] = $resolver;
        }
    }
public function extend(string $name, callable $resolver)
    {
        if ($resolver instanceof Closure) {
            $this->extensions[$name] = $resolver->bindTo($this, $this);
        } else {
            $this->extensions[$name] = $resolver;
        }
    }
public function extend ( string $ name , callable $ resolver ) { if ( $ resolver instanceof Closure ) { $ this -> extensions [ $ name ] = $ resolver -> bindTo ( $ this , $ this ) ; } else { $ this -> extensions [ $ name ] = $ resolver ; } }
Register an extension connection resolver.

@param string   $name
@param callable $resolver

@return void
Register an extension connection resolver .