You are here

interface ParameterFactoryInterface in JSON-RPC 2.x

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

Interface for all parameter factories.

Hierarchy

Expanded class hierarchy of ParameterFactoryInterface

All classes that implement ParameterFactoryInterface

2 files declare their use of ParameterFactoryInterface
JsonRpcMethodManager.php in src/Plugin/JsonRpcMethodManager.php
ParameterFactoryBase.php in src/ParameterFactory/ParameterFactoryBase.php

File

src/ParameterFactoryInterface.php, line 10

Namespace

Drupal\jsonrpc
View source
interface ParameterFactoryInterface {

  /**
   * An array representing the JSON Schema for acceptable input to the factory.
   *
   * @param \Drupal\jsonrpc\ParameterDefinitionInterface $parameter_definition
   *   A parameter definition for the method parameter being constructed.
   *
   * @return array
   *   The JSON Schema.
   */
  public static function schema(ParameterDefinitionInterface $parameter_definition);

  /**
   * Instantiates a new instance of this class.
   *
   * This is a factory method that returns a new instance of this class. The
   * factory should pass any needed dependencies into the constructor of this
   * class, but not the container itself. Every call to this method must return
   * a new instance of this class; that is, it may not implement a singleton.
   *
   * @param \Drupal\jsonrpc\ParameterDefinitionInterface $definition
   *   The parameter definition for parameters of this type.
   * @param \Symfony\Component\DependencyInjection\ContainerInterface $container
   *   The service container this instance should use.
   */
  public static function create(ParameterDefinitionInterface $definition, ContainerInterface $container);

}

Members

Namesort descending Modifiers Type Description Overrides
ParameterFactoryInterface::create public static function Instantiates a new instance of this class. 1
ParameterFactoryInterface::schema public static function An array representing the JSON Schema for acceptable input to the factory. 3