comparison core/lib/Drupal/Component/Plugin/Mapper/MapperInterface.php @ 0:4c8ae668cc8c

Initial import (non-working)
author Chris Cannam
date Wed, 29 Nov 2017 16:09:58 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:4c8ae668cc8c
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 }