Mercurial > hg > isophonics-drupal-site
annotate core/lib/Drupal/Component/Plugin/Mapper/MapperInterface.php @ 19:fa3358dc1485 tip
Add ndrum files
author | Chris Cannam |
---|---|
date | Wed, 28 Aug 2019 13:14:47 +0100 |
parents | 4c8ae668cc8c |
children |
rev | line source |
---|---|
Chris@0 | 1 <?php |
Chris@0 | 2 |
Chris@0 | 3 namespace Drupal\Component\Plugin\Mapper; |
Chris@0 | 4 |
Chris@0 | 5 /** |
Chris@0 | 6 * Plugin mapper interface. |
Chris@0 | 7 * |
Chris@0 | 8 * Plugin mappers are responsible for mapping a plugin request to its |
Chris@0 | 9 * implementation. For example, it might map a cache bin to a memcache bin. |
Chris@0 | 10 * |
Chris@0 | 11 * Mapper objects incorporate the best practices of retrieving configurations, |
Chris@0 | 12 * type information, and factory instantiation. |
Chris@0 | 13 */ |
Chris@0 | 14 interface MapperInterface { |
Chris@0 | 15 |
Chris@0 | 16 /** |
Chris@0 | 17 * Gets a preconfigured instance of a plugin. |
Chris@0 | 18 * |
Chris@0 | 19 * @param array $options |
Chris@0 | 20 * An array of options that can be used to determine a suitable plugin to |
Chris@0 | 21 * instantiate and how to configure it. |
Chris@0 | 22 * |
Chris@0 | 23 * @return object|false |
Chris@0 | 24 * A fully configured plugin instance. The interface of the plugin instance |
Chris@0 | 25 * will depend on the plugin type. If no instance can be retrieved, FALSE |
Chris@0 | 26 * will be returned. |
Chris@0 | 27 */ |
Chris@0 | 28 public function getInstance(array $options); |
Chris@0 | 29 |
Chris@0 | 30 } |