コード例 #1
0
ファイル: processWhatToGenerate.php プロジェクト: juddy/GIP
 $projectRoot = $thisGeneratePath . FILE_SEPARATOR . $thisDb;
 $rootUrl = URL_ADDRESS . "/generatedCode/simple/" . $thisDb;
 $thisFileUtils->makeDirectoryRecursive($projectRoot);
 $indexDirectory = $projectRoot . FILE_SEPARATOR . "index";
 $thisFileUtils->makeDirectoryRecursive($indexDirectory);
 $mainIndex = "";
 if ($thisCopyCommon == "y") {
     $commonDirectory = $projectRoot . FILE_SEPARATOR . "common";
     $thisFileUtils->makeDirectoryRecursive($commonDirectory);
     $htmlDirectory = $projectRoot . FILE_SEPARATOR . "html";
     $thisFileUtils->makeDirectoryRecursive($htmlDirectory);
     $arguments = "";
     $arguments['db'] = requestUtils::getRequestObject('db');
     $arguments['headerText'] = $headerText;
     $arguments['footerText'] = $footerText;
     $thisFileUtils->copyAllFilesFromPathToPath(FILES_TO_COPY_PHP_TEMPLATE_SIMPLE . FILE_SEPARATOR . "common", $commonDirectory);
     $thisFileUtils->copyAllFilesFromPathToPath(FILES_TO_COPY_PHP_TEMPLATE_SIMPLE . FILE_SEPARATOR . "html", $htmlDirectory);
     $thisCommobObjectCopier = new commonObjectCopier();
     $connectionCode = $thisCommobObjectCopier->getReplacedConnectionFileForSimpleApp($arguments);
     $connectionFileName = "dbConnection.php";
     $thisFileUtils->writeContentsToFile($commonDirectory, $connectionFileName, $connectionCode);
     echo "Copying common files to common Location...<br><br>";
 }
 for ($a = 0; $a < count($thisTables); $a++) {
     $currentTable = $thisTables[$a];
     $arguments = "";
     $arguments['table'] = $thisTables[$a];
     $arguments['db'] = requestUtils::getRequestObject('db');
     $arguments['headerText'] = $headerText;
     $arguments['footerText'] = $footerText;
     $thisTable = new table($currentTable, $thisDb);