public function load($pluginFqcn, $pluginPath = null)
    {
        if (!$pluginPath) {
            $rPlugin = new \ReflectionClass($pluginFqcn);
            $pluginPath = $rPlugin->getFileName();
        }

        if (!file_exists($pluginPath)) {
            throw new RuntimeException(
                "No bundle class file matches the FQCN '{$pluginFqcn}' "
                .'(expected path was : '.$pluginPath.')',
                self::NO_PLUGIN_FOUND
            );
        }

        return $this->getPluginInstance($pluginPath, $pluginFqcn);
    }
public function load($pluginFqcn, $pluginPath = null)
    {
        if (!$pluginPath) {
            $rPlugin = new \ReflectionClass($pluginFqcn);
            $pluginPath = $rPlugin->getFileName();
        }

        if (!file_exists($pluginPath)) {
            throw new RuntimeException(
                "No bundle class file matches the FQCN '{$pluginFqcn}' "
                .'(expected path was : '.$pluginPath.')',
                self::NO_PLUGIN_FOUND
            );
        }

        return $this->getPluginInstance($pluginPath, $pluginFqcn);
    }
public function load ( $ pluginFqcn , $ pluginPath = null ) { if ( ! $ pluginPath ) { $ rPlugin = new \ ReflectionClass ( $ pluginFqcn ) ; $ pluginPath = $ rPlugin -> getFileName ( ) ; } if ( ! file_exists ( $ pluginPath ) ) { throw new RuntimeException ( "No bundle class file matches the FQCN '{$pluginFqcn}' " . '(expected path was : ' . $ pluginPath . ')' , self :: NO_PLUGIN_FOUND ) ; } return $ this -> getPluginInstance ( $ pluginPath , $ pluginFqcn ) ; }
Searches a plugin bundle by its FQCN and returns an instance of it.

@param string $pluginFqcn
@param string $pluginPath

@throws RuntimeException if the plugin class cannot be found or instantiated

@return DistributionPluginBundle
Searches a plugin bundle by its FQCN and returns an instance of it .