"Fossies" - the Fresh Open Source Software Archive

Member "drupal-8.9.10/core/lib/Drupal/Component/Plugin/Mapper/MapperInterface.php" (26 Nov 2020, 872 Bytes) of package /linux/www/drupal-8.9.10.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) PHP source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "MapperInterface.php" see the Fossies "Dox" file reference documentation.

    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 }