src/Leevel/Di/Container.php
public function singleton($name, $service = null): IContainer
    {
        return $this->bind($name, $service, true);
    }
public function singleton($name, $service = null): IContainer
    {
        return $this->bind($name, $service, true);
    }
注册单一实例.

@param array|scalar $name
@param mixed        $service

@return $this