addPluginClass() public method

The plugin class must be a fully-qualified class name that implements {@link PuliPlugin}. If the class is not found or does not implement that interface, an exception is thrown. The plugin class must not have required parameters in its constructor so that it can be successfully instantiate. If the constructor has required parameters, an exception is thrown. Leading backslashes are removed from the fully-qualified class name.
public addPluginClass ( string $pluginClass )
$pluginClass string The fully qualified plugin class name.
 /**
  * {@inheritdoc}
  */
 public function addPluginClass($pluginClass)
 {
     if ($this->rootModuleFile->hasPluginClass($pluginClass)) {
         // Already installed locally
         return;
     }
     $this->validatePluginClass($pluginClass);
     $previousClasses = $this->rootModuleFile->getPluginClasses();
     $this->rootModuleFile->addPluginClass($pluginClass);
     try {
         $this->jsonStorage->saveRootModuleFile($this->rootModuleFile);
     } catch (Exception $e) {
         $this->rootModuleFile->setPluginClasses($previousClasses);
         throw $e;
     }
 }