interface MethodInterface in JSON-RPC 8
Same name and namespace in other branches
- 2.x src/MethodInterface.php \Drupal\jsonrpc\MethodInterface
Interface for the method plugins.
Hierarchy
- interface \Drupal\Core\Access\AccessibleInterface; interface \Drupal\Component\Plugin\Definition\PluginDefinitionInterface
- interface \Drupal\jsonrpc\MethodInterface
Expanded class hierarchy of MethodInterface
All classes that implement MethodInterface
5 files declare their use of MethodInterface
- DiscoveryController.php in modules/
jsonrpc_discovery/ src/ Controller/ DiscoveryController.php - JsonRpcMethod.php in src/
Annotation/ JsonRpcMethod.php - JsonRpcMethodBase.php in src/
Plugin/ JsonRpcMethodBase.php - JsonRpcMethodManager.php in src/
Plugin/ JsonRpcMethodManager.php - MaintenanceModeEnabled.php in modules/
jsonrpc_core/ src/ Plugin/ jsonrpc/ Method/ MaintenanceModeEnabled.php
File
- src/
MethodInterface.php, line 11
Namespace
Drupal\jsonrpcView source
interface MethodInterface extends AccessibleInterface, PluginDefinitionInterface {
/**
* The class method to call.
*
* @return string
* The PHP method on the RPC method object to call. Defaults to: execute.
*/
public function call();
/**
* How to use this method.
*
* @return \Drupal\Core\StringTranslation\TranslatableMarkup
* The usage text for the method.
*/
public function getUsage();
/**
* The parameters for this method.
*
* Can be a keyed array where the parameter names are the keys or an indexed
* array for positional parameters.
*
* @return \Drupal\jsonrpc\MethodParameterInterface[]|null
* The method params or NULL if none are accepted.
*/
public function getParams();
/**
* Whether the parameters are by-position.
*
* @return bool
* True if the parameters are positional.
*/
public function areParamsPositional();
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AccessibleInterface:: |
public | function | Checks data value access. | 9 |
MethodInterface:: |
public | function | Whether the parameters are by-position. | 1 |
MethodInterface:: |
public | function | The class method to call. | 1 |
MethodInterface:: |
public | function | The parameters for this method. | 1 |
MethodInterface:: |
public | function | How to use this method. | 1 |
PluginDefinitionInterface:: |
public | function | Gets the class. | 1 |
PluginDefinitionInterface:: |
public | function | Gets the plugin provider. | 1 |
PluginDefinitionInterface:: |
public | function | Gets the unique identifier of the plugin. | 1 |
PluginDefinitionInterface:: |
public | function | Sets the class. | 1 |