PHP Class Overtrue\Socialite\SocialiteManager

Inheritance: implements Overtrue\Socialite\FactoryInterface
Show file Open project: overtrue/socialite Class Usage Examples

Protected Properties

Property Type Description
$config Config The configuration.
$customCreators array The registered custom driver creators.
$drivers array The array of created "drivers".
$initialDrivers array The initial drivers.
$request Symfony\Component\HttpFoundation\Request The request instance.

Public Methods

Method Description
__call ( string $method, array $parameters ) : mixed Dynamically call the default driver instance.
__construct ( array $config, Request $request = null ) SocialiteManager constructor.
buildProvider ( string $provider, array $config ) : Overtrue\Socialite\AbstractProvider Build an OAuth 2 provider instance.
config ( Config $config ) Set config instance.
driver ( string $driver = null ) : mixed Get a driver instance.
extend ( string $driver, Closure $callback ) Register a custom driver creator Closure.
formatConfig ( array $config ) : array Format the server configuration.
getDefaultDriver ( ) : string Get the default driver name.
getDrivers ( ) : array Get all of the created "drivers".
with ( string $driver ) : mixed Get a driver instance.

Protected Methods

Method Description
callCustomCreator ( string $driver ) : mixed Call a custom driver creator.
createDefaultRequest ( ) : Request Create default request instance.
createDriver ( string $driver ) : mixed Create a new driver instance.

Method Details

__call() public method

Dynamically call the default driver instance.
public __call ( string $method, array $parameters ) : mixed
$method string
$parameters array
return mixed

__construct() public method

SocialiteManager constructor.
public __construct ( array $config, Request $request = null )
$config array
$request Symfony\Component\HttpFoundation\Request

buildProvider() public method

Build an OAuth 2 provider instance.
public buildProvider ( string $provider, array $config ) : Overtrue\Socialite\AbstractProvider
$provider string
$config array
return Overtrue\Socialite\AbstractProvider

callCustomCreator() protected method

Call a custom driver creator.
protected callCustomCreator ( string $driver ) : mixed
$driver string
return mixed

config() public method

Set config instance.
public config ( Config $config )
$config Config

createDefaultRequest() protected method

Create default request instance.
protected createDefaultRequest ( ) : Request
return Symfony\Component\HttpFoundation\Request

createDriver() protected method

Create a new driver instance.
protected createDriver ( string $driver ) : mixed
$driver string
return mixed

driver() public method

Get a driver instance.
public driver ( string $driver = null ) : mixed
$driver string
return mixed

extend() public method

Register a custom driver creator Closure.
public extend ( string $driver, Closure $callback )
$driver string
$callback Closure

formatConfig() public method

Format the server configuration.
public formatConfig ( array $config ) : array
$config array
return array

getDefaultDriver() public method

Get the default driver name.
public getDefaultDriver ( ) : string
return string

getDrivers() public method

Get all of the created "drivers".
public getDrivers ( ) : array
return array

with() public method

Get a driver instance.
public with ( string $driver ) : mixed
$driver string
return mixed

Property Details

$config protected property

The configuration.
protected Config,Overtrue\Socialite $config
return Config

$customCreators protected property

The registered custom driver creators.
protected array $customCreators
return array

$drivers protected property

The array of created "drivers".
protected array $drivers
return array

$initialDrivers protected property

The initial drivers.
protected array $initialDrivers
return array

$request protected property

The request instance.
protected Request,Symfony\Component\HttpFoundation $request
return Symfony\Component\HttpFoundation\Request