src/Zicht/Tool/Configuration/ConfigurationLoader.php
protected function loadPlugin($name, $file)
    {
        require_once $file;
        $className = sprintf('Zicht\Tool\Plugin\%s\Plugin', ucfirst(basename($name)));
        $class     = new \ReflectionClass($className);
        if (!$class->implementsInterface('Zicht\Tool\PluginInterface')) {
            throw new \UnexpectedValueException("The class $className is not a 'Zicht\\Tool\\PluginInterface'");
        }
        $this->plugins[$name] = $class->newInstance();
    }
protected function loadPlugin($name, $file)
    {
        require_once $file;
        $className = sprintf('Zicht\Tool\Plugin\%s\Plugin', ucfirst(basename($name)));
        $class     = new \ReflectionClass($className);
        if (!$class->implementsInterface('Zicht\Tool\PluginInterface')) {
            throw new \UnexpectedValueException("The class $className is not a 'Zicht\\Tool\\PluginInterface'");
        }
        $this->plugins[$name] = $class->newInstance();
    }
protected function loadPlugin ( $ name , $ file ) { require_once $ file ; $ className = sprintf ( 'Zicht\Tool\Plugin\%s\Plugin' , ucfirst ( basename ( $ name ) ) ) ; $ class = new \ ReflectionClass ( $ className ) ; if ( ! $ class -> implementsInterface ( 'Zicht\Tool\PluginInterface' ) ) { throw new \ UnexpectedValueException ( "The class $className is not a 'Zicht\\Tool\\PluginInterface'" ) ; } $ this -> plugins [ $ name ] = $ class -> newInstance ( ) ; }
Load the specified plugin instance.

@param string $name
@param string $file
@return void

@throws \UnexpectedValueException
Load the specified plugin instance .