src/Container.php
public function set($key, $value)
    {
        if (is_callable($value)) {
            $this->registerFactory($key, $value, false);
        } else {
            $this->sm->setService($key, $value);
        }
    }
public function set($key, $value)
    {
        if (is_callable($value)) {
            $this->registerFactory($key, $value, false);
        } else {
            $this->sm->setService($key, $value);
        }
    }
Set data key to value
@param string $key   The data key
@param mixed  $value The data value