mirror of
				https://github.com/elyby/oauth2-server.git
				synced 2025-05-31 14:12:07 +05:30 
			
		
		
		
	
		
			
				
	
	
		
			19 lines
		
	
	
		
			309 B
		
	
	
	
		
			PHP
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			309 B
		
	
	
	
		
			PHP
		
	
	
		
			Executable File
		
	
	
	
	
<?php
 | 
						|
 | 
						|
namespace OAuth2\Client;
 | 
						|
 | 
						|
class Provider
 | 
						|
{
 | 
						|
	private function __constuct() {}
 | 
						|
 | 
						|
	public static function factory($name, array $options = null)
 | 
						|
	{
 | 
						|
		if ( ! class_exists($name)) {
 | 
						|
 | 
						|
			throw new OAuth2\Client\Exception('There is no identity provider called: '.$name);
 | 
						|
 | 
						|
		}
 | 
						|
 | 
						|
		return new $name($options);
 | 
						|
	}
 | 
						|
} |