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;
        }
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;
        }
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 ; }
Add shared instance

@param  object                             $instance
@param  string                             $classOrAlias
@throws Exception
Add shared instance