You are here

public static function RestfulManager::createFromGlobals in RESTful 7.2

Factory method.

Return value

RestfulManager The newly created manager.

1 call to RestfulManager::createFromGlobals()
restful in ./restful.module
Get the RestfulManager.

File

src/RestfulManager.php, line 178
Contains \Drupal\restful\RestfulManager.

Class

RestfulManager

Namespace

Drupal\restful

Code

public static function createFromGlobals() {
  $request = Request::createFromGlobals();
  $response = Response::create();
  $resource_manager = new ResourceManager($request);
  $formatter_manager = new FormatterManager();
  $persistable_cache = new PersistableCache(RenderCache::CACHE_BIN);
  return new static($request, $response, $resource_manager, $formatter_manager, $persistable_cache);
}