PHP code example of eclipsegc / plugins

1. Go to this page and download the library: Download eclipsegc/plugins library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

eclipsegc / plugins example snippets


use \EclipseGc\Plugin\Dictionary\PluginDictionaryInterface;
use \EclipseGc\Plugin\Traits\PluginDictionaryTrait;

class MyDictionary implements PluginDictionaryInterface {
  use PluginDictionaryTrait;

  public function __construct(\Traversable $namespaces) {
    $this->discovery = new SomeDiscoveryClass();
    $this->factoryResolver = new SomeFactoryResolver();
    $this->factoryClass = 'My\Default\Factory';
    $this->pluginType = 'myType';
  }

}