Further Drupal 8.6.4 changes. Some core files were not committed before a commit...
[yaffs-website] / web / core / lib / Drupal / Component / Plugin / Mapper / MapperInterface.php
1 <?php
2
3 namespace Drupal\Component\Plugin\Mapper;
4
5 /**
6  * Plugin mapper interface.
7  *
8  * Plugin mappers are responsible for mapping a plugin request to its
9  * implementation. For example, it might map a cache bin to a memcache bin.
10  *
11  * Mapper objects incorporate the best practices of retrieving configurations,
12  * type information, and factory instantiation.
13  */
14 interface MapperInterface {
15
16   /**
17    * Gets a preconfigured instance of a plugin.
18    *
19    * @param array $options
20    *   An array of options that can be used to determine a suitable plugin to
21    *   instantiate and how to configure it.
22    *
23    * @return object|false
24    *   A fully configured plugin instance. The interface of the plugin instance
25    *   will depend on the plugin type. If no instance can be retrieved, FALSE
26    *   will be returned.
27    */
28   public function getInstance(array $options);
29
30 }