class SocialiteManager extends Manager implements Factory

Traits

Properties

protected Repository $config

The configuration repository instance.

from  Manager
protected Closure> $customCreators

The registered custom driver creators.

from  Manager
protected array<array-key, mixed> $drivers

The array of created "drivers".

from  Manager

Methods

Closure|null
bindCallbackToSelf(Closure $callback)

Bind the provided callback to the class instance.

__construct(Container $container)

Create a new manager instance.

from  Manager
string|null
getDefaultDriver()

Get the default driver name.

mixed
driver(UnitEnum|string|null $driver = null)

Get a driver instance.

mixed
createDriver(string $driver)

Create a new driver instance.

from  Manager
mixed
callCustomCreator(string $driver)

Call a custom driver creator.

from  Manager
extend(string $driver, Closure $callback)

Register a custom driver creator Closure.

from  Manager
array
getDrivers()

Get all of the created "drivers".

from  Manager
getContainer()

Get the container instance used by the manager.

from  Manager
setContainer(Container $container)

Set the container instance used by the manager.

from  Manager
forgetDrivers()

Forget all of the resolved driver instances.

from  Manager
mixed
__call(string $method, array $parameters)

Dynamically call the default driver instance.

from  Manager
with(string $driver)

Get a driver instance.

createGithubDriver()

Create an instance of the specified driver.

createFacebookDriver()

Create an instance of the specified driver.

createGoogleDriver()

Create an instance of the specified driver.

createLinkedinDriver()

Create an instance of the specified driver.

createLinkedinOpenidDriver()

Create an instance of the specified driver.

createBitbucketDriver()

Create an instance of the specified driver.

createGitlabDriver()

Create an instance of the specified driver.

createXDriver()

Create an instance of the specified driver.

createTwitchDriver()

Create an instance of the specified driver.

createSlackDriver()

Create an instance of the specified driver.

createSlackOpenidDriver()

Create an instance of the specified driver.

buildOAuth2Provider(string $provider, array|null $config)

Build an OAuth 2 provider instance.

string
formatRedirectUrl(array $config)

Format the callback URL, resolving a relative URI if needed.

Details

protected Closure|null bindCallbackToSelf(Closure $callback)

Bind the provided callback to the class instance.

Parameters

Closure $callback

Return Value

Closure|null

Exceptions

ReflectionException

in Manager at line 41
__construct(Container $container)

Create a new manager instance.

Parameters

Container $container

at line 245
string|null getDefaultDriver()

Get the default driver name.

Return Value

string|null

Exceptions

InvalidArgumentException

at line 44
mixed driver(UnitEnum|string|null $driver = null)

Get a driver instance.

Refreshes the request on cached providers so each coroutine gets the current request, not a stale one from first resolution.

Parameters

UnitEnum|string|null $driver

Return Value

mixed

in Manager at line 89
protected mixed createDriver(string $driver)

Create a new driver instance.

Parameters

string $driver

Return Value

mixed

Exceptions

InvalidArgumentException

in Manager at line 110
protected mixed callCustomCreator(string $driver)

Call a custom driver creator.

Parameters

string $driver

Return Value

mixed

in Manager at line 126
Manager extend(string $driver, Closure $callback)

Register a custom driver creator Closure.

Anonymous closures run in this manager's class scope; non-static closures also receive the manager as $this.

Boot-only. The callback persists in the singleton's customCreators array for the worker lifetime and applies to every subsequent driver resolution.

Parameters

string $driver
Closure $callback

Return Value

Manager

in Manager at line 145
array getDrivers()

Get all of the created "drivers".

Return Value

array

in Manager at line 153
Container getContainer()

Get the container instance used by the manager.

Return Value

Container

in Manager at line 167
Manager setContainer(Container $container)

Set the container instance used by the manager.

Tests only. Swaps the singleton's container and configuration references; per-request use races across coroutines and breaks every concurrent driver resolution through this manager.

Parameters

Container $container

Return Value

Manager

in Manager at line 184
Manager forgetDrivers()

Forget all of the resolved driver instances.

Boot or tests only. Clears the singleton's driver cache; concurrent coroutines may already hold references that next resolution will not share.

Return Value

Manager

in Manager at line 194
mixed __call(string $method, array $parameters)

Dynamically call the default driver instance.

Parameters

string $method
array $parameters

Return Value

mixed

at line 33
Provider with(string $driver)

Get a driver instance.

Parameters

string $driver

Return Value

Provider

at line 58
protected GithubProvider createGithubDriver()

Create an instance of the specified driver.

Return Value

GithubProvider

at line 71
protected FacebookProvider createFacebookDriver()

Create an instance of the specified driver.

Return Value

FacebookProvider

at line 84
protected GoogleProvider createGoogleDriver()

Create an instance of the specified driver.

Return Value

GoogleProvider

at line 97
protected LinkedInProvider createLinkedinDriver()

Create an instance of the specified driver.

Return Value

LinkedInProvider

at line 110
protected LinkedInOpenIdProvider createLinkedinOpenidDriver()

Create an instance of the specified driver.

Return Value

LinkedInOpenIdProvider

at line 123
protected BitbucketProvider createBitbucketDriver()

Create an instance of the specified driver.

Return Value

BitbucketProvider

at line 136
protected GitlabProvider createGitlabDriver()

Create an instance of the specified driver.

Return Value

GitlabProvider

at line 151
protected XProvider createXDriver()

Create an instance of the specified driver.

Return Value

XProvider

at line 164
protected TwitchProvider createTwitchDriver()

Create an instance of the specified driver.

Return Value

TwitchProvider

at line 177
protected SlackProvider createSlackDriver()

Create an instance of the specified driver.

Return Value

SlackProvider

at line 190
protected SlackOpenIdProvider createSlackOpenidDriver()

Create an instance of the specified driver.

Return Value

SlackOpenIdProvider

at line 208
AbstractProvider buildOAuth2Provider(string $provider, array|null $config)

Build an OAuth 2 provider instance.

Parameters

string $provider
array|null $config

Return Value

AbstractProvider

at line 231
protected string formatRedirectUrl(array $config)

Format the callback URL, resolving a relative URI if needed.

Parameters

array $config

Return Value

string