public function addResolver(string $name, callable $callback)
    {
        //if it's a closure, they meant to bind the callback
        if ($callback instanceof Closure) {
            //so there's no scope
            $callback = $callback->bindTo($this, get_class($this));
        }

        $this->getResolverHandler()->register($name, $callback);

        return $this;
    }
public function addResolver(string $name, callable $callback)
    {
        //if it's a closure, they meant to bind the callback
        if ($callback instanceof Closure) {
            //so there's no scope
            $callback = $callback->bindTo($this, get_class($this));
        }

        $this->getResolverHandler()->register($name, $callback);

        return $this;
    }
public function addResolver ( string $ name , callable $ callback ) { //if it's a closure, they meant to bind the callback if ( $ callback instanceof Closure ) { //so there's no scope $ callback = $ callback -> bindTo ( $ this , get_class ( $ this ) ) ; } $ this -> getResolverHandler ( ) -> register ( $ name , $ callback ) ; return $ this ; }
Adds a resolver callback

@param *string   $name
@param *callable $callback

@return ResolverTrait
Adds a resolver callback