Index: /branches/version-2_12-dev/data/class/helper/SC_Helper_Plugin.php
===================================================================
--- /branches/version-2_12-dev/data/class/helper/SC_Helper_Plugin.php	(revision 22018)
+++ /branches/version-2_12-dev/data/class/helper/SC_Helper_Plugin.php	(revision 22083)
@@ -105,4 +105,10 @@
         }
 
+        if ($hook_point == 'loadClassFileChange') {
+            $arrSaveArgs = $arrArgs;
+            $arrClassName = array();
+            $arrClassPath = array();
+        }
+
         if (array_key_exists($hook_point, $this->arrRegistedPluginActions)
             && is_array($this->arrRegistedPluginActions[$hook_point])) {
@@ -113,6 +119,26 @@
                 foreach ($arrFuncs as $func) {
                     if (!is_null($func['function'])) {
-                        call_user_func_array($func['function'], $arrArgs);
+                        if ($hook_point == 'loadClassFileChange') {
+                            $classname = $arrSaveArgs[0];
+                            $classpath = $arrSaveArgs[1];
+                            $arrTempArgs = array(&$classname, &$classpath);
+
+                            call_user_func_array($func['function'], $arrTempArgs);
+
+                            if ($classname !== $arrSaveArgs[0]) {
+                                $arrClassName[] = $classname;
+                                $arrClassPath[] = $classpath;
+                            }
+                        } else {
+                            call_user_func_array($func['function'], $arrArgs);
+                        }
                     }
+                }
+            }
+
+            if ($hook_point == 'loadClassFileChange') {
+                if (count($arrClassName) > 0) {
+                    $arrArgs[0] = $arrClassName;
+                    $arrArgs[1] = $arrClassPath;
                 }
             }
Index: /branches/version-2_12-dev/data/class/SC_ClassAutoloader.php
===================================================================
--- /branches/version-2_12-dev/data/class/SC_ClassAutoloader.php	(revision 21991)
+++ /branches/version-2_12-dev/data/class/SC_ClassAutoloader.php	(revision 22083)
@@ -72,22 +72,47 @@
             $plugin_class = $class;
             $plugin_classpath = $classpath;
+
             $objPlugin->doAction('loadClassFileChange', array(&$plugin_class, &$plugin_classpath));
+
             // FIXME: トリッキーな処理で _Ex ファイルを無視しないようにする（無視するとユーザーカスタマイズで分かりにくい)
             //        SC_XXXX_Ex がロードされる場合にextendsのchainを
             //        SC_XXXX_Ex -> SC_XXXX から、 SC_XXXX_Ex -> $class (-> SC_XXXX) と変える。
             //        そうでない場合は、直接置き換えと想定して帰ってきたクラスをロードする
-            if ($plugin_class !== $class) {
+            if (is_array($plugin_class) && count($plugin_class) > 0) {
+                $arrPluginClassName = $plugin_class;
+                $arrPluginClassPath = $plugin_classpath;
+
+                foreach ($arrPluginClassName as $key => $plugin_class) {
+                    $plugin_classpath = $arrPluginClassPath[$key];
+
+                    if ($is_ex) {
+                        // Ex ファイルへのフックの場合のみチェイン変更する。
+
+                        if ($parent_classname) {
+                            $exp = "/(class[ ]+{$plugin_class}[ ]+extends +)[a-zA-Z_\-]+( *{?)/";
+                            $replace = '$1' . $parent_classname . '$2';
+
+                            $base_class_str = file_get_contents($plugin_classpath);
+                            $base_class_str = str_replace(array('<?php', '?>'), '', $base_class_str);
+                            $base_class_str = preg_replace($exp, $replace, $base_class_str, 1);
+                            eval($base_class_str);
+                        } else {
+                            include $plugin_classpath;
+                        }
+
+                        $parent_classname = $plugin_class;
+                    } else {
+                        include $plugin_classpath;
+                    }
+                }
+
                 if ($is_ex) {
-                    // Ex ファイルへのフックの場合のみチェイン変更する。
-                    $exp = "/(class[ ]+{$class}[ ]+extends +)[a-zA-Z_\-]+( *{)/";
-                    $replace = '$1' . $plugin_class . '$2';
+                    $exp = "/(class[ ]+{$class}[ ]+extends +)[a-zA-Z_\-]+( *{?)/";
+                    $replace = '$1' . $parent_classname . '$2';
                     $base_class_str = file_get_contents($classpath);
                     $base_class_str = str_replace(array('<?php', '?>'), '', $base_class_str);
                     $base_class_str = preg_replace($exp, $replace, $base_class_str, 1);
-                    include $plugin_classpath;
                     eval($base_class_str);
                     return;
-                } else {
-                    include $plugin_classpath;
                 }
             }
