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