本文整理汇总了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";
}