code: public function set($key, $value)
      {
          if (is_callable($value)) {
              $this->registerFactory($key, $value, false);
          } else {
              $this->sm->setService($key, $value);
          }
      }
docs: Set data key to value
  @param string $key   The data key
  @param mixed  $value The data value