original_string: 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();
      }
code: 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();
      }
code_tokens: 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 ( ) ; }
docstring: Load the specified plugin instance.
  
  @param string $name
  @param string $file
  @return void
  
  @throws \UnexpectedValueException
docstring_tokens: Load the specified plugin instance .