src/Container.php
public function singleton($key, $value)
    {
        if (is_callable($value)) {
            $this->registerFactory($key, $value);
        } else {
            $this->sm->setService($key, $value);
        }
    }
public function singleton($key, $value)
    {
        if (is_callable($value)) {
            $this->registerFactory($key, $value);
        } else {
            $this->sm->setService($key, $value);
        }
    }
Ensure a value or object will remain globally unique
@param string $key The value or object name
@param $value
@return mixed