Missing provider class

Signed-off-by: Alex Bilbie <alex@alexbilbie.com>
This commit is contained in:
Alex Bilbie 2012-10-14 17:33:22 +01:00
parent 0897e6226c
commit 99f54d1a02

19
src/Oauth2/Client/Provider.php Executable file
View File

@ -0,0 +1,19 @@
<?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);
}
}