vendor/rdlowrey/auryn/lib/Provider.php
/**
     * Stores a shared instance of the specified class
     *
     * If an instance of the class is specified, it will be stored and shared
     * for calls to `Provider::make` for that class until the shared instance
     * is manually removed or refreshed.
     *
     * If a string class name is specified, the Provider will mark the class
     * as "shared" and the next time the Provider is used to instantiate the
     * class it's instance will be stored and shared.
     *
     * @param mixed $classNameOrInstance
     * @throws InjectionException
     * @throws BadArgumentException
     * @return \Auryn\Provider Returns the current instance
     */
Stores a shared instance of the specified class
If an instance of the class is specified, it will be stored and shared
for calls to `Provider::make` for that class until the shared instance
is manually removed or refreshed.

If a string class name is specified, the Provider will mark the class
as "shared" and the next time the Provider is used to instantiate the
class it's instance will be stored and shared.

@param mixed $classNameOrInstance
@throws InjectionException
@throws BadArgumentException
@return \Auryn\Provider Returns the current instance
Stores a shared instance of the specified class If an instance of the class is specified it will be stored and shared for calls to ` Provider :: make ` for that class until the shared instance is manually removed or refreshed . If a string class name is specified the Provider will mark the class as " shared " and the next time the Provider is used to instantiate the class it ' s instance will be stored and shared . @param mixed $classNameOrInstance @throws InjectionException @throws BadArgumentException @return \ Auryn \ Provider Returns the current instance
public function share($classNameOrInstance) {
        if (is_string($classNameOrInstance)) {
            $this->shareClass($classNameOrInstance);
        } elseif (is_object($classNameOrInstance)) {
            $this->shareObject($classNameOrInstance);
        } else {
            throw new BadArgumentException(
                sprintf($this->errorMessages[self::E_SHARE_ARGUMENT], __CLASS__, gettype($classNameOrInstance)),
                self::E_SHARE_ARGUMENT
            );
        }
        return $this;
    }
public function share ( $ classNameOrInstance ) { if ( is_string ( $ classNameOrInstance ) ) { $ this -> shareClass ( $ classNameOrInstance ) ; } elseif ( is_object ( $ classNameOrInstance ) ) { $ this -> shareObject ( $ classNameOrInstance ) ; } else { throw new BadArgumentException ( sprintf ( $ this -> errorMessages [ self :: E_SHARE_ARGUMENT ] , __CLASS__ , gettype ( $ classNameOrInstance ) ) , self :: E_SHARE_ARGUMENT ) ; } return $ this ; }
Stores a shared instance of the specified class
 If an instance of the class is specified, it will be stored and shared
 for calls to `Provider::make` for that class until the shared instance
 is manually removed or refreshed.
Stores a shared instance of the specified class If an instance of the class is specified it will be stored and shared for calls to ` Provider :: make ` for that class until the shared instance is manually removed or refreshed .