public function addSharedInstance($instance, $classOrAlias)
        {
            if (!is_object($instance)) {
                throw new Exception('This method requires an object to be shared. Class or Alias given: ' . $classOrAlias);
            }

            $this->sharedInstances[$classOrAlias] = $instance;
        }