You are here

public function AccessToken__1_0::controllersInfo in RESTful 7.2

Gets the controllers.

Return value

array An structured configuration array. Contains the regular expression for the path as the key and an array of key values as its value. That array of key values contains the HTTP method as the key and the name of the public method to execute as the value. If an access callback is needed one can be provided by turning the value into an array with the keys: 'callback' and 'access callback'.

Overrides Resource::controllersInfo

See also

getControllers()

File

modules/restful_token_auth/src/Plugin/resource/AccessToken__1_0.php, line 45
Contains Drupal\restful_token_auth\Plugin\resource\AccessToken__1_0.

Class

AccessToken__1_0
Class AccessToken__1_0 @package Drupal\restful_token_auth\Plugin\resource

Namespace

Drupal\restful_token_auth\Plugin\resource

Code

public function controllersInfo() {
  return array(
    '' => array(
      // Get or create a new token.
      RequestInterface::METHOD_GET => 'getOrCreateToken',
      RequestInterface::METHOD_OPTIONS => 'discover',
    ),
  );
}