public function setInstance(string $class, $instance, string $selector = Injector::DEFAULT_SELECTOR)
    {
        if (!is_a($instance, $class))
            throw new DIException("Instance should be a subclass of $class");

        if (!isset($this->objects[$class]))
            $this->objects[$class] = [];

        $this->objects[$class][$selector] = $instance;
    }