public function resolveGuard( $name )
	{
		$config = Config::get( 'auth.guards.' . $name );

		if ( is_null( $config ) )
			throw new AccountException( "Auth guard [" . $name . "] is not defined in the configuration" );

		$uses = $config['uses'];
		$auth = $this->resolveAuth( $config['auth'] ?: $this->getDefaultAuth() );

		$guard = null;
		switch ( $uses )
		{
			case 'session':
			{
				$guard = new SessionGuard( $name, $auth, SessionManager::i()->driver(), Request::i(), CookieJar::i() );
				break;
			}
			case 'token':
			{
				$guard = new TokenGuard( $auth, Request::i() );
				break;
			}
			default:
			{
				$guard = UniversalBuilder::resolve( $uses );

				if ( is_null( $guard ) )
					throw new AccountException( "We could not resolve the guard [" . $uses . "]" );

				if ( !is_subclass_of( $guard, Guard::class ) )
					throw new \InvalidArgumentException( "The guard [" . $uses . "] must extend the [" . Guard::class . "] class" );
			}
		}

		return $guard;
	}
public function resolveGuard( $name )
	{
		$config = Config::get( 'auth.guards.' . $name );

		if ( is_null( $config ) )
			throw new AccountException( "Auth guard [" . $name . "] is not defined in the configuration" );

		$uses = $config['uses'];
		$auth = $this->resolveAuth( $config['auth'] ?: $this->getDefaultAuth() );

		$guard = null;
		switch ( $uses )
		{
			case 'session':
			{
				$guard = new SessionGuard( $name, $auth, SessionManager::i()->driver(), Request::i(), CookieJar::i() );
				break;
			}
			case 'token':
			{
				$guard = new TokenGuard( $auth, Request::i() );
				break;
			}
			default:
			{
				$guard = UniversalBuilder::resolve( $uses );

				if ( is_null( $guard ) )
					throw new AccountException( "We could not resolve the guard [" . $uses . "]" );

				if ( !is_subclass_of( $guard, Guard::class ) )
					throw new \InvalidArgumentException( "The guard [" . $uses . "] must extend the [" . Guard::class . "] class" );
			}
		}

		return $guard;
	}
public function resolveGuard ( $ name ) { $ config = Config :: get ( 'auth.guards.' . $ name ) ; if ( is_null ( $ config ) ) throw new AccountException ( "Auth guard [" . $ name . "] is not defined in the configuration" ) ; $ uses = $ config [ 'uses' ] ; $ auth = $ this -> resolveAuth ( $ config [ 'auth' ] ? : $ this -> getDefaultAuth ( ) ) ; $ guard = null ; switch ( $ uses ) { case 'session' : { $ guard = new SessionGuard ( $ name , $ auth , SessionManager :: i ( ) -> driver ( ) , Request :: i ( ) , CookieJar :: i ( ) ) ; break ; } case 'token' : { $ guard = new TokenGuard ( $ auth , Request :: i ( ) ) ; break ; } default : { $ guard = UniversalBuilder :: resolve ( $ uses ) ; if ( is_null ( $ guard ) ) throw new AccountException ( "We could not resolve the guard [" . $ uses . "]" ) ; if ( ! is_subclass_of ( $ guard , Guard :: class ) ) throw new \ InvalidArgumentException ( "The guard [" . $ uses . "] must extend the [" . Guard :: class . "] class" ) ; } } return $ guard ; }
Resolve the implemented Account Guard

@param string $name
Resolve the implemented Account Guard