src/Leevel/Option/Option.php
public function delete(string $name): void
    {
        $name = $this->parseNamespace($name);
        $namespaces = $name[0];
        $name = $name[1];

        if ('*' === $name) {
            $this->option[$namespaces] = [];

            return;
        }

        if (!strpos($name, '.')) {
            if (isset($this->option[$namespaces][$name])) {
                unset($this->option[$namespaces][$name]);
            }
        } else {
            $parts = explode('.', $name);
            $max = count($parts) - 1;
            $option = &$this->option[$namespaces];

            for ($i = 0; $i <= $max; $i++) {
                $part = $parts[$i];

                if ($i < $max) {
                    if (!isset($option[$part])) {
                        break;
                    }

                    $option = &$option[$part];
                } else {
                    if (isset($option[$part])) {
                        unset($option[$part]);
                    }
                }
            }
        }
    }
public function delete(string $name): void
    {
        $name = $this->parseNamespace($name);
        $namespaces = $name[0];
        $name = $name[1];

        if ('*' === $name) {
            $this->option[$namespaces] = [];

            return;
        }

        if (!strpos($name, '.')) {
            if (isset($this->option[$namespaces][$name])) {
                unset($this->option[$namespaces][$name]);
            }
        } else {
            $parts = explode('.', $name);
            $max = count($parts) - 1;
            $option = &$this->option[$namespaces];

            for ($i = 0; $i <= $max; $i++) {
                $part = $parts[$i];

                if ($i < $max) {
                    if (!isset($option[$part])) {
                        break;
                    }

                    $option = &$option[$part];
                } else {
                    if (isset($option[$part])) {
                        unset($option[$part]);
                    }
                }
            }
        }
    }
删除配置.

@param string $name