You are here

interface MethodInterface in JSON-RPC 2.x

Same name and namespace in other branches
  1. 8 src/MethodInterface.php \Drupal\jsonrpc\MethodInterface

Interface for the method plugins.


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


src/MethodInterface.php, line 11


View 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();



Namesort descending Modifiers Type Description Overrides
AccessibleInterface::access public function Checks data value access. 9
MethodInterface::areParamsPositional public function Whether the parameters are by-position. 1
MethodInterface::call public function The class method to call. 1
MethodInterface::getParams public function The parameters for this method. 1
MethodInterface::getUsage public function How to use this method. 1
PluginDefinitionInterface::getClass public function Gets the class. 1
PluginDefinitionInterface::getProvider public function Gets the plugin provider. 1
PluginDefinitionInterface::id public function Gets the unique identifier of the plugin. 1
PluginDefinitionInterface::setClass public function Sets the class. 1