$row) { $debugOutput = ""; foreach($row as $entry) { $debugOutput = 'actionPoint=>'.$actionPoint . ' '; // $entry['loadFile'] = str_replace(array(':', '\\\\'), '', $entry['loadFile']); switch($entry['autoType']) { case 'include': /** * include a file as specified by autoloader array */ if (file_exists($entry['loadFile'])) include($entry['loadFile']); else $debugOutput .= 'FAILED: '; $debugOutput .= 'include(\'' . $entry['loadFile'] . '\');' . '
'; break; case 'require': /** * require a file as specified by autoloader array */ if (file_exists($entry['loadFile'])) require($entry['loadFile']); else $debugOutput .= 'FAILED: '; $debugOutput .= 'require(\'' . $entry['loadFile'] . '\');' . '
'; break; case 'init_script': $baseDir = DIR_WS_INCLUDES . 'init_includes/'; if (file_exists(DIR_WS_INCLUDES . 'init_includes/overrides/' . $entry['loadFile'])) { $baseDir = DIR_WS_INCLUDES . 'init_includes/overrides/'; } /** * include an init_script as specified by autoloader array */ require($baseDir . $entry['loadFile']); $debugOutput .= 'require(\'' . $baseDir . $entry['loadFile'] . '\');' . '
'; break; case 'class': if (isset($entry['classPath'])) { $classPath = $entry['classPath']; } else { $classPath = DIR_FS_CATALOG . DIR_WS_CLASSES; } /** * include a class definition as specified by autoloader array */ if (file_exists($classPath . $entry['loadFile'])) include($classPath . $entry['loadFile']); else $debugOutput .= 'FAILED: '; $debugOutput .= 'include(\'' . $classPath . $entry['loadFile'] . '\');' . '
'; break; case 'classInstantiate': $objectName = $entry['objectName']; $className = $entry['className']; if (isset($entry['classSession']) && $entry['classSession'] === true) { if (isset($entry['checkInstantiated']) && $entry['checkInstantiated'] === true) { if (!isset($_SESSION[$objectName])) { $_SESSION[$objectName] = new $className(); $debugOutput .= 'if (!$_SESSION[' . $objectName . ']) { '; $debugOutput .= '$_SESSION[' . $objectName . '] = new ' . $className . '();'; $debugOutput .= ' }
'; } } else { $_SESSION[$objectName] = new $className(); $debugOutput .= ' $_SESSION[' . $objectName . '] = new ' . $className . '();
'; } } else { $$objectName = new $className(); $debugOutput .= '$' . $objectName . ' = new ' . $className . '();
'; } break; case 'objectMethod': $objectName = $entry['objectName']; $methodName = $entry['methodName']; if (is_object($_SESSION[$objectName])) { $_SESSION[$objectName]->$methodName(); $debugOutput .= '$_SESSION[' . $objectName . ']->' . $methodName . '();
'; } else { $$objectName->$methodName(); $debugOutput .= '$' . $objectName . '->' . $methodName . '();
'; } break; } if (DEBUG_AUTOLOAD === true) echo $debugOutput; } }