public function extend($name, $value)
    {
        if (is_callable($value)) {
            $this->extensions[$name] = $value;
        } else {
            $this->extensions[$name] = function ($ontraport) use ($value) {
                return new $value($ontraport);
            };
        }

        return $this;
    }