You are here

public static function AuthenticationPluginManager::create in RESTful 7.2

AuthenticationPluginManager factory method.

Parameters

string $bin: The cache bin for the plugin manager.

bool $avoid_singleton: Do not use the stored singleton.

Return value

AuthenticationPluginManager The created manager.

4 calls to AuthenticationPluginManager::create()
AuthenticationManager::addAllAuthenticationProviders in src/Authentication/AuthenticationManager.php
Adds all the auth providers to the list.
AuthenticationManager::addAuthenticationProvider in src/Authentication/AuthenticationManager.php
Adds the auth provider to the list.
AuthenticationManager::__construct in src/Authentication/AuthenticationManager.php
Constructs a new AuthenticationManager object.
RestfulAuthenticationTestCase::setUp in tests/RestfulAuthenticationTestCase.test
Sets up a Drupal site for running functional and integration tests.

File

src/Plugin/AuthenticationPluginManager.php, line 60
Contains \Drupal\restful\Plugin\AuthenticationPluginManager.

Class

AuthenticationPluginManager
Authentication plugin manager.

Namespace

Drupal\restful\Plugin

Code

public static function create($bin = 'cache', $avoid_singleton = FALSE) {
  $factory = function ($bin) {
    return new static(Module::getNamespaces(), _cache_get_object($bin));
  };
  if ($avoid_singleton) {
    $factory($bin);
  }
  return static::semiSingletonInstance($factory, array(
    $bin,
  ));
}