wotapi-8.x-1.x-dev/src/ParameterFactoryInterface.php

src/ParameterFactoryInterface.php
<?php

namespace Drupal\wotapi;

use Symfony\Component\DependencyInjection\ContainerInterface;

/**
 * Interface for all parameter factories.
 */
interface ParameterFactoryInterface {

  /**
   * An array representing the JSON Schema for acceptable input to the factory.
   *
   * @param \Drupal\wotapi\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\wotapi\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);

}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc