public static function _getClassPath($className) { $a = explode(".", $className); foreach ($a as $k => $s) { $bFlag = preg_match("/alys/i", $s) ? true : false; if ($bFlag) { $s = str_replace("alys", '', strtolower($s)); $s = "ALYS" . \YcheukfReport\Lib\ALYS\ALYSFunction::ucfirst($s); } else { $a[$k] = \YcheukfReport\Lib\ALYS\ALYSFunction::ucfirst($s); } } return $a; }
/** * load engine */ private function _loadEngine($p) { $aInput = self::getInput(); $sEngDir = \YcheukfReport\Lib\ALYS\ALYSFunction::ucfirst($p); $sEngFile = \YcheukfReport\Lib\ALYS\ALYSFunction::ucfirst($aInput['input'][$p]['type']); //输入参数转化 $oInput = \YcheukfReport\Lib\ALYS\ALYSFunction::loadClass("report.input.{$sEngDir}.{$sEngFile}"); $oInput->fmtInput(); \YcheukfReport\Lib\ALYS\ALYSFunction::debug($aInput, 'a', "input data after fmt:report.engine.{$sEngDir}.{$sEngFile}"); //处理 $sObjectEng = $this->_enginName($sEngDir); $this->{$sObjectEng} = \YcheukfReport\Lib\ALYS\ALYSFunction::loadClass("report.engine.{$sEngDir}.{$sEngFile}"); self::$aOutput[$p] = $this->{$sObjectEng}->getData(); \YcheukfReport\Lib\ALYS\ALYSFunction::debug(self::$aOutput, 'a', "data after engine: report.engine.{$sEngDir}.{$sEngFile}"); //输出参数转化 $oOutput = \YcheukfReport\Lib\ALYS\ALYSFunction::loadClass("report.output.{$sEngDir}.{$sEngFile}"); $oOutput->fmtOutput(); \YcheukfReport\Lib\ALYS\ALYSFunction::debug(self::$aOutput, 'a', "data after output: report.engine.{$sEngDir}.{$sEngFile}"); }