src/Framework/Containers.php
public function set(string $container, $object, ConfigInterface $config = null): ContainersInterface
    {
        if (!$this->has($container)) {
            if (\is_object($object)) {
                $this->setContainer($container, $object);
            } else {
                $class = '\\DrMVC\\' . $object;
                $this->setContainer($container, new $class($config));
            }
        }
        return $this;
    }
public function set(string $container, $object, ConfigInterface $config = null): ContainersInterface
    {
        if (!$this->has($container)) {
            if (\is_object($object)) {
                $this->setContainer($container, $object);
            } else {
                $class = '\\DrMVC\\' . $object;
                $this->setContainer($container, new $class($config));
            }
        }
        return $this;
    }
public function set ( string $ container , $ object , ConfigInterface $ config = null ) : ContainersInterface { if ( ! $ this -> has ( $ container ) ) { if ( \ is_object ( $ object ) ) { $ this -> setContainer ( $ container , $ object ) ; } else { $ class = '\\DrMVC\\' . $ object ; $ this -> setContainer ( $ container , new $ class ( $ config ) ) ; } } return $ this ; }
PSR-11 set container

@param   string $container
@param   string|object $object
@param   ConfigInterface $config
@return  ContainersInterface
PSR - 11 set container