WordPress\AiClient\Providers
ProviderRegistry::setProviderRequestAuthentication
Sets the request authentication instance for the given provider.
Method of the class: ProviderRegistry{}
No Hooks.
Returns
null. Nothing (null).
Usage
$ProviderRegistry = new ProviderRegistry(); $ProviderRegistry->setProviderRequestAuthentication( $idOrClassName, $requestAuthentication ): void;
- $idOrClassName(string|class-string
) (required) - The provider ID or class name.
- $requestAuthentication(RequestAuthenticationInterface) (required)
- The request authentication instance.
Changelog
| Since 0.1.0 | Introduced. |
ProviderRegistry::setProviderRequestAuthentication() ProviderRegistry::setProviderRequestAuthentication code WP 7.0.2
public function setProviderRequestAuthentication(string $idOrClassName, RequestAuthenticationInterface $requestAuthentication): void
{
$className = $this->resolveProviderClassName($idOrClassName);
$this->providerAuthenticationInstances[$className] = $requestAuthentication;
$this->setRequestAuthenticationForProvider($className, $requestAuthentication);
}