protected function resolveOnce($class)
    {
        if (isset($this->instances[$class])) {
            return $this->instances[$class];
        }
        $this->instances[$class] = call_user_func($this->container, $class);

        return $this->instances[$class];
    }