本文整理匯總了PHP中ProjectModule::getProjectModulesByTicket方法的典型用法代碼示例。如果您正苦於以下問題:PHP ProjectModule::getProjectModulesByTicket方法的具體用法?PHP ProjectModule::getProjectModulesByTicket怎麽用?PHP ProjectModule::getProjectModulesByTicket使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ProjectModule
的用法示例。
在下文中一共展示了ProjectModule::getProjectModulesByTicket方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: MySQL
}
//other method or field
}
}
rat.regCmp('rat.module');
<?php
require_once "bin/Path.php";
require_once "bin/util/util.php";
require_once PHP_BASE_DIR . "/db/MySQL.php";
require_once PHP_BASE_DIR . "/entity/ProjectModule.php";
$db = new MySQL($log);
$mysqli = $db->openDB();
$projectModule = new ProjectModule($mysqli, $log);
try {
if ($projectModule->getProjectModulesByTicket($ticket)) {
$s = new SaeStorage();
$content = $s->fileExists(SAE_STORAGE_DOMAIN, SAE_MODULES . "/" . basename($projectModule->module_path)) ? $s->read(SAE_STORAGE_DOMAIN, SAE_MODULES . "/" . basename($projectModule->module_path)) . "\n" : "";
$content .= "rat.extend(true,rat.module.core,rat.module);\n";
if ($projectModule->config != null && $projectModule->config != "[]") {
$content .= "rat.module.core.init(" . $projectModule->config . ");\n";
}
} else {
$content = "\r\nrat.module.core = {\r\n\tconfig:null,\r\n\tbrowser_details:function(){\r\n\t\tvar details = rat.browser.getDetails();\r\n\t\tdetails['rat_cookie'] = rat.session.get_rat_cookie_id();\r\n\t\tdetails['Core Module Result'] = 'Can't find the core module, use the default!';\r\n\t\tvar details_ob = \$.arrayToJSON(details);\r\n\t\tthis.sendResult(details_ob);\r\n\t},\r\n\texploit:function(){\r\n\t\tthis.browser_details();\r\n\t}\r\n\r\n};\n";
$content .= "rat.extend(true,rat.module.core,rat.module);\n";
}
} catch (Exception $e) {
//拋出異常
$content = "\r\nrat.module.core = {\r\n\tconfig:null,\r\n\tbrowser_details:function(){\r\n\t\tvar details = rat.browser.getDetails();\r\n\t\tdetails['rat_cookie'] = rat.session.get_rat_cookie_id();\r\n\t\tdetails['Core Module Result'] = 'Load Core Module Failed, Exception: " . $e->getMessage() . "';\r\n\t\tvar details_ob = \$.arrayToJSON(details);\r\n\t\tthis.sendResult(details_ob);\r\n\t},\r\n\texploit:function(){\r\n\t\tthis.browser_details();\r\n\t}\r\n\r\n};\n";
$content .= "rat.extend(true,rat.module.core,rat.module);\n";
}