function generate() { $thisPlugInLoader = new plugInLoader(); $thisTable = $this->getTableObject(); $arguments = ""; $arguments['db'] = $thisTable->getDatabase(); $arguments['table'] = $thisTable->getTableName(); $arguments['variables'] = $thisTable->getFieldNameArray(); $arguments['functions'] = array(); $arguments['className'] = strtolower($thisTable->getTableName()) . ucfirst(strtolower(NAME_DATA_CONTAINER)); $generatedCode = $thisPlugInLoader->loadPlugIn(PLUGIN_PHP_CLASS_GENERATOR_NAME, PLUGIN_PHP_CLASS_GENERATOR_CLASS, $arguments); $this->appendToCode($generatedCode); $beautifulCode = codeBeautifier::beautify($this->getSourceCode()); return $beautifulCode; }
function getGeneratedClassCode() { $thisTable = $this->getTableObject(); $arguments = array(); $arguments['db'] = $thisTable->getDatabase(); $arguments['table'] = $thisTable->getTableName(); $thisPlugInLoader = new plugInLoader(); $generatedInsertCode = $thisPlugInLoader->loadPlugIn(PLUGIN_PHP_GENIE_APP_DAO_INSERT_GENERATOR_NAME, PLUGIN_PHP_GENIE_APP_DAO_INSERT_GENERATOR_CLASS, $arguments); $generatedUpdateCode = $thisPlugInLoader->loadPlugIn(PLUGIN_PHP_GENIE_APP_DAO_UPDATE_GENERATOR_NAME, PLUGIN_PHP_GENIE_APP_DAO_UPDATE_GENERATOR_CLASS, $arguments); $generatedDeleteCode = $thisPlugInLoader->loadPlugIn(PLUGIN_PHP_GENIE_APP_DAO_DELETE_GENERATOR_NAME, PLUGIN_PHP_GENIE_APP_DAO_DELETE_GENERATOR_CLASS, $arguments); $generatedGetByIdCode = $thisPlugInLoader->loadPlugIn(PLUGIN_PHP_GENIE_APP_DAO_GETBYID_GENERATOR_NAME, PLUGIN_PHP_GENIE_APP_DAO_GETBYID_GENERATOR_CLASS, $arguments); $generatedPopulateIntoInfoCode = $thisPlugInLoader->loadPlugIn(PLUGIN_PHP_GENIE_APP_DAO_POPULATEINTOINFO_GENERATOR_NAME, PLUGIN_PHP_GENIE_APP_DAO_POPULATEINTOINFO_GENERATOR_CLASS, $arguments); $generatedSearchCode = $thisPlugInLoader->loadPlugIn(PLUGIN_PHP_GENIE_APP_DAO_SEARCH_GENERATOR_NAME, PLUGIN_PHP_GENIE_APP_DAO_SEARCH_GENERATOR_CLASS, $arguments); //$searchByKeywordCode = $this->generateSearchByKeywordDao(); $generatedCode = ""; $generatedCode .= "\n<?php \n"; $generatedCode .= "// Class Representing the " . $this->getInfoName() . " table \n"; $generatedCode .= "// and DML operations on it from the database\n\n"; if (GENERATE_FOR_PHP5) { $generatedCode .= "abstract "; } $generatedCode .= "class " . $this->getTableName() . "GenDAO { \n\n"; $generatedCode .= $generatedInsertCode . $this->getLineEnder() . $this->getLineEnder(); $generatedCode .= $generatedUpdateCode . $this->getLineEnder() . $this->getLineEnder(); $generatedCode .= $generatedDeleteCode . $this->getLineEnder() . $this->getLineEnder(); $generatedCode .= $generatedSearchCode . $this->getLineEnder() . $this->getLineEnder(); $generatedCode .= $generatedGetByIdCode . $this->getLineEnder() . $this->getLineEnder(); $generatedCode .= $generatedPopulateIntoInfoCode . $this->getLineEnder() . $this->getLineEnder(); $generatedCode .= "} // end of " . $this->getTableName() . "GenDAO Class\n\n"; $generatedCode .= "?>"; return $generatedCode; }
<?php include_once "//var/www/gip/app/settings/gipConfiguration.inc.php"; include_once INC_SUPERHEADER; include_once CLASS_PLUGIN_LOADER; $thisPlugInLoader = new plugInLoader(); $arguments = array(); $arguments['db'] = requestUtils::getRequestObject('db'); $arguments['table'] = requestUtils::getRequestObject('table'); $arguments['headerText'] = ""; $arguments['footerText'] = ""; $generatedCode = $thisPlugInLoader->loadPlugIn(PLUGIN_PHP_SIMPLE_WEB_UPDATE_GENERATOR_NAME, PLUGIN_PHP_SIMPLE_WEB_UPDATE_GENERATOR_CLASS, $arguments); highlight_string($generatedCode);
<?php include_once "//var/www/gip/app/settings/gipConfiguration.inc.php"; include_once INC_SUPERHEADER; include_once CLASS_PLUGIN_LOADER; $thisPlugInLoader = new plugInLoader(); $arguments = array(); $arguments['db'] = requestUtils::getRequestObject('db'); $arguments['table'] = requestUtils::getRequestObject('table'); $generatedCode = $thisPlugInLoader->loadPlugIn(PLUGIN_PHP_GENIE_APP_MANAGER_GENERATOR_NAME, PLUGIN_PHP_GENIE_APP_MANAGER_GENERATOR_CLASS, $arguments); highlight_string($generatedCode);
<?php include_once "//var/www/gip/app/settings/gipConfiguration.inc.php"; include_once INC_SUPERHEADER; include_once CLASS_PLUGIN_LOADER; $thisPlugInLoader = new plugInLoader(); $arguments = array(); $arguments['db'] = requestUtils::getRequestObject('db'); $arguments['table'] = requestUtils::getRequestObject('table'); $allCode = $thisPlugInLoader->loadPlugIn(PLUGIN_PHP_GENIE_APP_GENDAO_GENERATOR_NAME, PLUGIN_PHP_GENIE_APP_GENDAO_GENERATOR_CLASS, $arguments); highlight_string($allCode);
<?php include_once "//var/www/gip/app/settings/gipConfiguration.inc.php"; include_once CLASS_PLUGIN_LOADER; $thisPlugInLoader = new plugInLoader(); // Building Arguments Array to pass to Plugin $arguments['db'] = $_REQUEST['db']; $arguments['table'] = $_REQUEST['table']; // Loading and Getting the generated Code from the plugin $generatedCode = $thisPlugInLoader->loadPlugIn("myDbPlugin", "./myDbPlugin.class.php", $arguments); // I preffer highlight_string($generatedCode) if its php code echo $generatedCode;
<?php include_once "//var/www/gip/app/settings/gipConfiguration.inc.php"; include_once INC_SUPERHEADER; include_once CLASS_PLUGIN_LOADER; $thisPlugInLoader = new plugInLoader(); $arguments = array(); $arguments['db'] = $_SESSION['db']; $arguments['table'] = $_SESSION['table']; $generatedCode = $thisPlugInLoader->loadPlugIn(PPLUGIN_PHP_GENIE_APP_DAO_INSERT_GENERATOR_NAME, PLUGIN_PHP_GENIE_APP_DAO_INSERT_GENERATOR_CLASS, $arguments); highlight_string($generatedCode);
<?php include_once "//var/www/gip/app/settings/gipConfiguration.inc.php"; include_once INC_SUPERHEADER; include_once CLASS_PLUGIN_LOADER; $thisPlugInLoader = new plugInLoader(); $arguments = array(); $arguments['db'] = requestUtils::getRequestObject('db'); $arguments['table'] = requestUtils::getRequestObject('table'); $arguments['headerText'] = ""; $arguments['footerText'] = ""; $generatedCode = $thisPlugInLoader->loadPlugIn(PLUGIN_PHP_SIMPLE_WEB_POWER_SEARCH_SCRIPT_GENERATOR_NAME, PLUGIN_PHP_SIMPLE_WEB_POWER_SEARCH_SCRIPT_GENERATOR_CLASS, $arguments); highlight_string($generatedCode);
<?php include_once "//var/www/gip/app/settings/gipConfiguration.inc.php"; include_once INC_SUPERHEADER; include_once CLASS_FILESYSTEM_UTILS; include_once CLASS_TABLE; include_once CLASS_PLUGIN_LOADER; include_once CLASS_COMMON_OBJECT_COPIER; include_once CLASS_PHP_GIP_UTILS_COMMON_FILE_COPIER; $thisPlugInLoader = new plugInLoader(); $thisCommonFileCopier = new gipCommonFileCopier(); $arguments = array(); $thisGeneratePath = requestUtils::getRequestObject('generatePath'); $thisConfigFile = requestUtils::getRequestObject('configFile'); $thisGenEnter = requestUtils::getRequestObject('enter'); $thisGenEdit = requestUtils::getRequestObject('edit'); $thisGenDelete = requestUtils::getRequestObject('delete'); $thisGenList = requestUtils::getRequestObject('lister'); $thisGenSearch = requestUtils::getRequestObject('search'); $thisGenView = requestUtils::getRequestObject('viewRecord'); $thisCopyCommon = requestUtils::getRequestObject('copyCommon'); $thisGenIndex = "y"; $thisLanguage = requestUtils::getRequestObject('language'); $thisTables = requestUtils::getRequestObject('tableName'); $headerText = requestUtils::getRequestObject('headerText'); $footerText = requestUtils::getRequestObject('footerText'); $headerText = "include_once(\"../common/dbConnection.php\");\ninclude_once(\"../common/header.php\");"; $footerText = "include_once(\"../common/footer.php\");"; $thisDb = requestUtils::getRequestObject('db'); $thisTable = requestUtils::getRequestObject('table'); $thisFileUtils = new fileSystemUtils();
<?php include_once "//var/www/gip/app/settings/gipConfiguration.inc.php"; include_once INC_SUPERHEADER; include_once CLASS_PLUGIN_LOADER; include_once CLASS_FILESYSTEM_UTILS; include_once CLASS_DATABASE; $thisFileSystemUtils = new fileSystemUtils(); $thisPlugInLoader = new plugInLoader(); $thisDatabase = new database(); $thisDb = requestUtils::getRequestObject('db'); echo "Db : {$thisDb} <br>"; $thisDatabase->useDatabase($thisDb); $dbTables = $thisDatabase->getDbTables(); $arguments = array(); for ($a = 0; $a < count($dbTables); $a++) { $arguments['db'] = requestUtils::getRequestObject('db'); $arguments['table'] = requestUtils::getRequestObject('table'); echo "<pre>"; print_r($arguments); echo "</pre>"; echo "<hr>"; $generatedEnterFormCode = $thisPlugInLoader->loadPlugIn(PLUGIN_PHP_GENIE_WEB_ENTER_FORM_GENERATOR_NAME, PLUGIN_PHP_GENIE_WEB_ENTER_FORM_GENERATOR_CLASS, $arguments); $generatedInsertCode = $thisPlugInLoader->loadPlugIn(PLUGIN_PHP_GENIE_WEB_INSERT_GENERATOR_NAME, PLUGIN_PHP_GENIE_WEB_INSERT_GENERATOR_CLASS, $arguments); $generatedEditFormCode = $thisPlugInLoader->loadPlugIn(PLUGIN_PHP_GENIE_WEB_EDIT_FORM_GENERATOR_NAME, PLUGIN_PHP_GENIE_WEB_EDIT_FORM_GENERATOR_CLASS, $arguments); $generatedUpdateCode = $thisPlugInLoader->loadPlugIn(PLUGIN_PHP_GENIE_WEB_UPDATE_GENERATOR_NAME, PLUGIN_PHP_GENIE_WEB_UPDATE_GENERATOR_CLASS, $arguments); $generatedViewRecordCode = $thisPlugInLoader->loadPlugIn(PLUGIN_PHP_GENIE_WEB_INSERT_GENERATOR_NAME, PLUGIN_PHP_GENIE_WEB_INSERT_GENERATOR_CLASS, $arguments); $newWebPath = GENERATED_FILES_FOLDER . FILE_SEPARATOR . strtolower($_SESSION['db']) . FILE_SEPARATOR . "web" . FILE_SEPARATOR . "generatedForms" . FILE_SEPARATOR . strtolower($arguments['table']); $newAppPath = GENERATED_FILES_FOLDER . FILE_SEPARATOR . strtolower($_SESSION['db']) . FILE_SEPARATOR . "app" . FILE_SEPARATOR . "classes" . FILE_SEPARATOR . strtolower($arguments['table']); $newEnterFileName = $newWebPath . FILE_SEPARATOR . "enterNew" . ucfirst($arguments['table']) . ".php"; $newInsertFileName = $newWebPath . FILE_SEPARATOR . "insert" . ucfirst($arguments['table']) . ".php";
<?php include_once "//var/www/gip/app/settings/gipConfiguration.inc.php"; include_once INC_SUPERHEADER; include_once CLASS_DATABASE_QUERY; include_once CLASS_PLUGIN_LOADER; $thisPlugInLoader = new plugInLoader(); $thisDbQuery = new databaseQuery(); $arguments = array(); $arguments['headerText'] = ""; $arguments['footerText'] = ""; $arguments['db'] = requestUtils::getRequestObject('db'); $thisDbQuery->useDatabase(requestUtils::getRequestObject('db')); $allTables = $thisDbQuery->getTables(); for ($a = 0; $a < count($allTables); $a++) { $arguments['table'] = $allTables[$a]; echo "<h2>" . $arguments['table'] . "</h2>"; $generatedInsertCode = $thisPlugInLoader->loadPlugIn(PLUGIN_PHP_SIMPLE_WEB_INSERT_GENERATOR_NAME, PLUGIN_PHP_SIMPLE_WEB_INSERT_GENERATOR_CLASS, $arguments); $generatedDeleteCode = $thisPlugInLoader->loadPlugIn(PLUGIN_PHP_SIMPLE_WEB_DELETE_GENERATOR_NAME, PLUGIN_PHP_SIMPLE_WEB_DELETE_GENERATOR_CLASS, $arguments); $generatedUpdateCode = $thisPlugInLoader->loadPlugIn(PLUGIN_PHP_SIMPLE_WEB_UPDATE_GENERATOR_NAME, PLUGIN_PHP_SIMPLE_WEB_UPDATE_GENERATOR_CLASS, $arguments); $generatedListerCode = $thisPlugInLoader->loadPlugIn(PLUGIN_PHP_SIMPLE_WEB_LISTER_GENERATOR_NAME, PLUGIN_PHP_SIMPLE_WEB_LISTER_GENERATOR_CLASS, $arguments); highlight_string($generatedInsertCode); echo "<hr>"; highlight_string($generatedDeleteCode); echo "<hr>"; highlight_string($generatedUpdateCode); echo "<hr>"; highlight_string($generatedListerCode); echo "<hr>"; }
<?php include_once "//var/www/gip/app/settings/gipConfiguration.inc.php"; include_once INC_SUPERHEADER; include_once CLASS_PLUGIN_LOADER; $thisPlugInLoader = new plugInLoader(); $author = urldecode($_REQUEST['author']); $description = urldecode($_REQUEST['description']); $arguments['db'] = $_REQUEST['db']; $arguments['table'] = $_REQUEST['table']; $plugInName = $_REQUEST['name']; $plugInPath = $_REQUEST['path']; $generatedCode = $thisPlugInLoader->loadPlugIn($plugInName, $plugInPath, $arguments); ?> <table> <tr> <td align="right"><b><?php echo LANG_UPLUGINS_PLUGIN_NAME; ?> :</b> </td> <td><?php echo $plugInName; ?> </td> </tr> <tr> <td align="right"><b><?php echo LANG_BASIC_DESCRIPTION; ?> :</b></td> <td><?php
<?php include_once "//var/www/gip/app/settings/gipConfiguration.inc.php"; include_once INC_SUPERHEADER; include_once CLASS_PLUGIN_LOADER; $thisPlugInLoader = new plugInLoader(); $arguments = array(); $arguments['db'] = requestUtils::getRequestObject('db'); $arguments['table'] = requestUtils::getRequestObject('table'); $arguments['headerText'] = ""; $arguments['footerText'] = ""; $generatedCode = $thisPlugInLoader->loadPlugIn(PLUGIN_PHP_SIMPLE_WEB_DELETE_CONFIRMATION_GENERATOR_NAME, PLUGIN_PHP_SIMPLE_WEB_DELETE_CONFIRMATION_GENERATOR_CLASS, $arguments); highlight_string($generatedCode);
<?php include_once "//var/www/gip/app/settings/gipConfiguration.inc.php"; include_once INC_SUPERHEADER; include_once CLASS_PLUGIN_LOADER; include_once CLASS_PHP_CODE_BEAUTIFIER; $thisCodeBeautifier = new codeBeautifier(); $thisPlugInLoader = new plugInLoader(); $arguments['db'] = $_REQUEST['db']; $arguments['table'] = $_REQUEST['table']; /* $insertSQL = $thisPlugInLoader->loadPlugIn( PLUGIN_SQL_INSERT_GENERATOR_NAME, PLUGIN_SQL_INSERT_GENERATOR_CLASS, $arguments ); echo "<h2>Insert SQL</h2>"; $thisCodeBeautifier->printBeautifulSQL($insertSQL); echo "<hr>"; $updateSQL = $thisPlugInLoader->loadPlugIn( PLUGIN_SQL_UPDATE_GENERATOR_NAME, PLUGIN_SQL_UPDATE_GENERATOR_CLASS, $arguments ); echo "<h2>Update SQL</h2>";
<?php include_once "//var/www/gip/app/settings/gipConfiguration.inc.php"; include_once INC_SUPERHEADER; include_once CLASS_PLUGIN_LOADER; $thisPlugInLoader = new plugInLoader(); $arguments = array(); $arguments['db'] = requestUtils::getRequestObject('db'); $arguments['table'] = requestUtils::getRequestObject('table'); $arguments['headerText'] = ""; $arguments['footerText'] = ""; $generatedCode = $thisPlugInLoader->loadPlugIn(PLUGIN_PHP_SIMPLE_MAIN_INDEX_GENERATOR_NAME, PLUGIN_PHP_SIMPLE_MAIN_INDEX_GENERATOR_CLASS, $arguments); highlight_string($generatedCode);
<?php include_once "//var/www/gip/app/settings/gipConfiguration.inc.php"; include_once INC_SUPERHEADER; include_once CLASS_PLUGIN_LOADER; include_once CLASS_PHP_CODE_BEAUTIFIER; $thisCodeBeautifier = new codeBeautifier(); $thisPlugInLoader = new plugInLoader(); $fieldNames = $_REQUEST['fieldNames']; for ($a = 0; $a < count($fieldNames); $a++) { $fieldTypes[$fieldNames[$a]] = $_REQUEST["fieldType" . $fieldNames[$a]]; $fieldLabels[$fieldNames[$a]] = $_REQUEST["label" . $fieldNames[$a]]; } $arguments['db'] = $_REQUEST['db']; $arguments['table'] = $_REQUEST['table']; $arguments['fieldTypes'] = $fieldTypes; $arguments['fieldLabels'] = $fieldLabels; $arguments['packageRoot'] = $_REQUEST['packageRoot']; $generatedCode = $thisPlugInLoader->loadPlugIn(PLUGIN_JAVA_EJB_BEAN_GENERATOR_NAME, PLUGIN_JAVA_EJB_BEAN_GENERATOR_CLASS, $arguments); echo "<h2>EJB INFO Bean</h2>"; $thisCodeBeautifier->printBeautifulJavaCode($generatedCode); echo "<hr>"; $generatedCode1 = $thisPlugInLoader->loadPlugIn(PLUGIN_JAVA_EJB_GENERATOR_NAME, PLUGIN_JAVA_EJB_GENERATOR_CLASS, $arguments); echo "<h2>EJB</h2>"; $thisCodeBeautifier->printBeautifulJavaCode($generatedCode1); echo "<hr>"; $generatedCode2 = $thisPlugInLoader->loadPlugIn(PLUGIN_JAVA_EJB_LOCAL_GENERATOR_NAME, PLUGIN_JAVA_EJB_LOCAL_GENERATOR_CLASS, $arguments); echo "<h2>EJB LOCAL</h2>"; $thisCodeBeautifier->printBeautifulJavaCode($generatedCode2); echo "<hr>"; echo "<h2>EJB LOCAL HOME</h2>";
<?php include_once "//var/www/gip/app/settings/gipConfiguration.inc.php"; include_once INC_SUPERHEADER; include_once CLASS_PLUGIN_LOADER; $thisPlugInLoader = new plugInLoader(); $arguments = array(); $arguments['db'] = $_SESSION['db']; $arguments['table'] = $_SESSION['table']; $generatedCode = $thisPlugInLoader->loadPlugIn(PLUGIN_PHP_GENIE_COMMONPAGES_GENERATOR_NAME, PLUGIN_PHP_GENIE_COMMONPAGES_GENERATOR_CLASS, $arguments); highlight_string($generatedCode);
<?php include_once "//var/www/gip/app/settings/gipConfiguration.inc.php"; include_once INC_SUPERHEADER; include_once CLASS_PLUGIN_LOADER; $thisPlugInLoader = new plugInLoader(); $arguments = array(); $arguments['db'] = requestUtils::getRequestObject('db'); $arguments['table'] = requestUtils::getRequestObject('table'); $generatedCode = $thisPlugInLoader->loadPlugIn(PLUGIN_PHP_GENIE_WEB_DELETE_GENERATOR_NAME, PLUGIN_PHP_GENIE_WEB_DELETE_GENERATOR_CLASS, $arguments); highlight_string($generatedCode);
<?php include_once "//var/www/gip/app/settings/gipConfiguration.inc.php"; include_once INC_SUPERHEADER; include_once CLASS_FILESYSTEM_UTILS; include_once CLASS_TABLE; include_once CLASS_PLUGIN_LOADER; include_once CLASS_PHP_GENIE_UTILS_INDEX_BUILDER; include_once CLASS_PHP_GENIE_UTILS_COMMON_FILE_COPIER; $thisPlugInLoader = new plugInLoader(); $arguments = array(); $thisGeneratePath = requestUtils::getRequestObject('generatePath'); $thisConfigFile = requestUtils::getRequestObject('configFile'); $thisGenDao = requestUtils::getRequestObject('genDao'); $thisGenManager = requestUtils::getRequestObject('genManager'); $thisInfoObject = requestUtils::getRequestObject('infoObject'); $thisManager = requestUtils::getRequestObject('manager'); $thisDao = requestUtils::getRequestObject('dao'); $thisConstants = requestUtils::getRequestObject('constants'); $thisCopyCommon = requestUtils::getRequestObject('copyCommon'); $thisFrontEnd = requestUtils::getRequestObject('frontEnd'); $thisLanguage = requestUtils::getRequestObject('language'); $thisTables = requestUtils::getRequestObject('tableName'); $thisDb = requestUtils::getRequestObject('db'); $thisTable = requestUtils::getRequestObject('table'); $headerText = requestUtils::getRequestObject('headerText'); $footerText = requestUtils::getRequestObject('footerText'); $tableSideBar = ""; $thisFileUtils = new fileSystemUtils(); $thisCommonFileCopier = new gipCommonFileCopier(); if ($thisConfigFile == ".conf.php") {