private function resolveInstance(string $id)
    {
        if (Validator::key($id)->validate($this->instances)) {
            return $this->instances[$id];
        }
        return $this->resolveAutomaticResolvable($id);
    }
private function resolveInstance(string $id)
    {
        if (Validator::key($id)->validate($this->instances)) {
            return $this->instances[$id];
        }
        return $this->resolveAutomaticResolvable($id);
    }
private function resolveInstance ( string $ id ) { if ( Validator :: key ( $ id ) -> validate ( $ this -> instances ) ) { return $ this -> instances [ $ id ] ; } return $ this -> resolveAutomaticResolvable ( $ id ) ; }
Try to retrieve a service instance from the instances array.

@param string $id The service identifier.

@return mixed The service.

@throws ContainerException If the service identifier is not a string.
Try to retrieve a service instance from the instances array .