public function replace($handler, $bindTo = true)
    {
        if ($bindTo && $handler instanceof Closure) {
            $handler = $handler->bindTo($this, $this);
        }
        $this->handler = $handler;
    }