use key as class name
authorChristian Weiske <cweiske@cweiske.de>
Sun, 15 Apr 2012 11:37:22 +0000 (13:37 +0200)
committerChristian Weiske <cweiske@cweiske.de>
Sun, 15 Apr 2012 11:37:22 +0000 (13:37 +0200)
data/config.default.php
src/phorkie/Tool/Manager.php

index c08d401..e8c3d80 100644 (file)
@@ -7,8 +7,8 @@ $GLOBALS['phorkie']['cfg'] = array(
     'css'     => 'http://twitter.github.com/bootstrap/assets/css/bootstrap.css',
 );
 $GLOBALS['phorkie']['tools'] = array(
-    '\\phorkie\\Tool_Xmllint',
-    '\\phorkie\\Tool_PHPlint',
+    '\\phorkie\\Tool_Xmllint' => true,
+    '\\phorkie\\Tool_PHPlint' => true,
 );
 /**
  * Array of supported file types / languages.
index 3bcf750..8e18199 100644 (file)
@@ -8,7 +8,7 @@ class Tool_Manager
     {
         $ext = $file->getExt();
         $suitables = array();
-        foreach ($GLOBALS['phorkie']['tools'] as $class) {
+        foreach ($GLOBALS['phorkie']['tools'] as $class => $arSetup) {
             if (array_search($ext, $class::$arSupportedExtensions) !== false) {
                 $suitables[] = new Tool_Info($class);
             }