WordPress\AiClient\Providers

ProviderRegistry::getProviderRequestAuthenticationpublicWP 0.1.0

Gets the request authentication instance for the given provider, if set.

Метод класса: ProviderRegistry{}

Хуков нет.

Возвращает

?RequestAuthenticationInterface. The request authentication instance, or null if not set.

Использование

$ProviderRegistry = new ProviderRegistry();
$ProviderRegistry->getProviderRequestAuthentication( $idOrClassName ): ?RequestAuthenticationInterface;
$idOrClassName(строка|class-string) (обязательный)
The provider ID or class name.

Список изменений

С версии 0.1.0 Введена.

Код ProviderRegistry::getProviderRequestAuthentication() WP 7.0

public function getProviderRequestAuthentication(string $idOrClassName): ?RequestAuthenticationInterface
{
    $className = $this->resolveProviderClassName($idOrClassName);
    if (!isset($this->providerAuthenticationInstances[$className])) {
        return null;
    }
    return $this->providerAuthenticationInstances[$className];
}