interface PluginCollectionInterface in Extensible BBCode 8.3
Same name and namespace in other branches
- 4.0.x src/PluginCollectionInterface.php \Drupal\xbbcode\PluginCollectionInterface
 
Common methods to access a plugin collection.
This abstraction has the simple purpose of allowing functions to take both an associative array of plugins and a full plugin collection instance.
Hierarchy
- interface \Drupal\xbbcode\PluginCollectionInterface extends \ArrayAccess \Countable \IteratorAggregate
 
Expanded class hierarchy of PluginCollectionInterface
All classes that implement PluginCollectionInterface
File
- src/
PluginCollectionInterface.php, line 15  
Namespace
Drupal\xbbcodeView source
interface PluginCollectionInterface extends ArrayAccess, Countable, IteratorAggregate {
  /**
   * Determines if a plugin instance exists.
   *
   * @param string $instance_id
   *   The ID of the plugin instance to check.
   *
   * @return bool
   *   TRUE if the plugin instance exists, FALSE otherwise.
   */
  public function has($instance_id) : bool;
  /**
   * Gets a plugin instance, initializing it if necessary.
   *
   * @param string $instance_id
   *   The ID of the plugin instance being retrieved.
   */
  public function &get($instance_id);
  /**
   * Stores an initialized plugin.
   *
   * @param string $instance_id
   *   The ID of the plugin instance being stored.
   * @param mixed $value
   *   An instantiated plugin.
   */
  public function set($instance_id, $value);
  /**
   * Removes an initialized plugin.
   *
   * The plugin can still be used; it will be reinitialized.
   *
   * @param string $instance_id
   *   The ID of the plugin instance to remove.
   */
  public function remove($instance_id);
}Members
| 
            Name | 
                  Modifiers | Type | Description | Overrides | 
|---|---|---|---|---|
| 
            PluginCollectionInterface:: | 
                  public | function | Gets a plugin instance, initializing it if necessary. | |
| 
            PluginCollectionInterface:: | 
                  public | function | Determines if a plugin instance exists. | |
| 
            PluginCollectionInterface:: | 
                  public | function | Removes an initialized plugin. | |
| 
            PluginCollectionInterface:: | 
                  public | function | Stores an initialized plugin. |