How to use module_info class

Best Phoronix-test-suite code snippet using module_info

Module.php

Source:Module.php Github

copy

Full Screen

...82 ini_set('memory_limit', '1024M');83 if ($name == '') $this->error('模块不存在!');84 if ($name == 'admin' || $name == 'user') $this->error('禁止操作系统核心模块!');85 // 模块配置信息86 $module_info = ModuleModel::getInfoFromFile($name);87 if ($confirm == 0) {88 $need_module = [];89 $need_plugin = [];90 $table_check = [];91 // 检查模块依赖92 if (isset($module_info['need_module']) && !empty($module_info['need_module'])) {93 $need_module = $this->checkDependence('module', $module_info['need_module']);94 }95 // 检查插件依赖96 if (isset($module_info['need_plugin']) && !empty($module_info['need_plugin'])) {97 $need_plugin = $this->checkDependence('plugin', $module_info['need_plugin']);98 }99 // 检查数据表100 if (isset($module_info['tables']) && !empty($module_info['tables'])) {101 foreach ($module_info['tables'] as $table) {102 if (Db::query("SHOW TABLES LIKE '" . config('database.prefix') . "{$table}'")) {103 $table_check[] = [104 'table' => config('database.prefix') . "{$table}",105 'result' => '<span class="text-danger">存在同名</span>'106 ];107 } else {108 $table_check[] = [109 'table' => config('database.prefix') . "{$table}",110 'result' => '<i class="fa fa-check text-success"></i>'111 ];112 }113 }114 }115 $this->assign('need_module', $need_module);116 $this->assign('need_plugin', $need_plugin);117 $this->assign('table_check', $table_check);118 $this->assign('name', $name);119 $this->assign('page_title', '安装模块:' . $name);120 return $this->fetch();121 }122 // 执行安装文件123 $install_file = realpath(Env::get('app_path') . $name . '/install.php');124 if (file_exists($install_file)) {125 @include($install_file);126 }127 // 执行安装模块sql文件128 $sql_file = realpath(Env::get('app_path') . $name . '/sql/install.sql');129 if (file_exists($sql_file)) {130 if (isset($module_info['database_prefix']) && !empty($module_info['database_prefix'])) {131 $sql_statement = Sql::getSqlFromFile($sql_file, false, [$module_info['database_prefix'] => config('database.prefix')]);132 } else {133 $sql_statement = Sql::getSqlFromFile($sql_file);134 }135 if (!empty($sql_statement)) {136 foreach ($sql_statement as $value) {137 try {138 Db::execute($value);139 } catch (\Exception $e) {140 $this->error('导入SQL失败,请检查install.sql的语句是否正确');141 }142 }143 }144 }145 // 添加菜单146 $menus = ModuleModel::getMenusFromFile($name);147 if (is_array($menus) && !empty($menus)) {148 if (false === $this->addMenus($menus, $name)) {149 $this->error('菜单添加失败,请重新安装');150 }151 }152 // 检查是否有模块设置信息153 if (isset($module_info['config']) && !empty($module_info['config'])) {154 $module_info['config'] = json_encode(parse_config($module_info['config']));155 }156 // 检查是否有模块授权配置157 if (isset($module_info['access']) && !empty($module_info['access'])) {158 $module_info['access'] = json_encode($module_info['access']);159 }160 // 检查是否有行为规则161 if (isset($module_info['action']) && !empty($module_info['action'])) {162 $ActionModel = new ActionModel;163 if (!$ActionModel->saveAll($module_info['action'])) {164 MenuModel::where('module', $name)->delete();165 $this->error('行为添加失败,请重新安装');166 }167 }168 // 将模块信息写入数据库169 $ModuleModel = new ModuleModel($module_info);170 $allowField = ['name', 'title', 'icon', 'description', 'author', 'author_url', 'config', 'access', 'version', 'identifier', 'status'];171 if ($ModuleModel->allowField($allowField)->save()) {172 // 复制静态资源目录173 File::copy_dir(Env::get('app_path') . $name . '/public', Env::get('root_path') . 'public');174 // 删除静态资源目录175 File::del_dir(Env::get('app_path') . $name . '/public');176 cache('modules', null);177 cache('module_all', null);178 // 记录行为179 action_log('module_install', 'admin_module', 0, UID, $module_info['title']);180 $this->success('模块安装成功', 'index');181 } else {182 MenuModel::where('module', $name)->delete();183 $this->error('模块安装失败');184 }185 }186 /**187 * 卸载模块188 * @param string $name 模块名189 * @param int $confirm 是否确认190 * @return mixed191 * @throws \think\Exception192 * @throws \think\exception\PDOException193 */194 public function uninstall($name = '', $confirm = 0)195 {196 if ($name == '') $this->error('模块不存在!');197 if ($name == 'admin') $this->error('禁止操作系统模块!');198 // 模块配置信息199 $module_info = ModuleModel::getInfoFromFile($name);200 if ($confirm == 0) {201 $this->assign('name', $name);202 $this->assign('page_title', '卸载模块:' . $name);203 return $this->fetch();204 }205 // 执行卸载文件206 $uninstall_file = realpath(Env::get('app_path') . $name . '/uninstall.php');207 if (file_exists($uninstall_file)) {208 @include($uninstall_file);209 }210 // 执行卸载模块sql文件211 $clear = $this->request->get('clear');212 if ($clear == 1) {213 $sql_file = realpath(Env::get('app_path') . $name . '/sql/uninstall.sql');214 if (file_exists($sql_file)) {215 if (isset($module_info['database_prefix']) && !empty($module_info['database_prefix'])) {216 $sql_statement = Sql::getSqlFromFile($sql_file, false, [$module_info['database_prefix'] => config('database.prefix')]);217 } else {218 $sql_statement = Sql::getSqlFromFile($sql_file);219 }220 if (!empty($sql_statement)) {221 foreach ($sql_statement as $sql) {222 try {223 Db::execute($sql);224 } catch (\Exception $e) {225 $this->error('卸载失败,请检查uninstall.sql的语句是否正确');226 }227 }228 }229 }230 }231 // 删除菜单232 if (false === MenuModel::where('module', $name)->delete()) {233 $this->error('菜单删除失败,请重新卸载');234 }235 // 删除授权信息236 if (false === Db::name('admin_access')->where('module', $name)->delete()) {237 $this->error('删除授权信息失败,请重新卸载');238 }239 // 删除行为规则240 if (false === Db::name('admin_action')->where('module', $name)->delete()) {241 $this->error('删除行为信息失败,请重新卸载');242 }243 // 删除模块信息244 if (ModuleModel::where('name', $name)->delete()) {245 // 复制静态资源目录246 File::copy_dir(Env::get('root_path') . 'public/static/' . $name, Env::get('app_path') . $name . '/public/static/' . $name);247 // 删除静态资源目录248 File::del_dir(Env::get('root_path') . 'public/static/' . $name);249 cache('modules', null);250 cache('module_all', null);251 // 记录行为252 action_log('module_uninstall', 'admin_module', 0, UID, $module_info['title']);253 $this->success('模块卸载成功', 'index');254 } else {255 $this->error('模块卸载失败');256 }257 }258 /**259 * 更新模块配置260 * @param string $name 模块名261 */262 public function update($name = '')263 {264 $name == '' && $this->error('缺少模块名!');265 $Module = ModuleModel::get(['name' => $name]);266 !$Module && $this->error('模块不存在,或未安装');267 // 模块配置信息268 $module_info = ModuleModel::getInfoFromFile($name);269 unset($module_info['name']);270 // 检查是否有模块设置信息271 if (isset($module_info['config']) && !empty($module_info['config'])) {272 $module_info['config'] = json_encode(parse_config($module_info['config']));273 } else {274 $module_info['config'] = '';275 }276 // 检查是否有模块授权配置277 if (isset($module_info['access']) && !empty($module_info['access'])) {278 $module_info['access'] = json_encode($module_info['access']);279 } else {280 $module_info['access'] = '';281 }282 // 更新模块信息283 if (false !== $Module->save($module_info)) {284 $this->success('模块配置更新成功');285 } else {286 $this->error('模块配置更新失败,请重试');287 }288 }289 /**290 * 导出模块291 * @param string $name 模块名292 * @throws \think\db\exception\DataNotFoundException293 * @throws \think\db\exception\ModelNotFoundException294 * @throws \think\exception\DbException295 */296 public function export($name = '')297 {298 if ($name == '') $this->error('缺少模块名');299 $export_data = $this->request->get('export_data', '');300 if ($export_data == '') {301 $this->assign('page_title', '导出模块:' . $name);302 return $this->fetch();303 }304 // 模块导出目录305 $module_dir = Env::get('root_path') . 'export/module/' . $name;306 // 删除旧的导出数据307 if (is_dir($module_dir)) {308 File::del_dir($module_dir);309 }310 // 复制模块目录到导出目录311 File::copy_dir(Env::get('app_path') . $name, $module_dir);312 // 复制静态资源目录313 File::copy_dir(Env::get('root_path') . 'public/static/' . $name, $module_dir . '/public/static/' . $name);314 // 模块本地配置信息315 $module_info = ModuleModel::getInfoFromFile($name);316 // 检查是否有模块设置信息317 if (isset($module_info['config'])) {318 $db_config = ModuleModel::where('name', $name)->value('config');319 $db_config = json_decode($db_config, true);320 // 获取最新的模块设置信息321 $module_info['config'] = set_config_value($module_info['config'], $db_config);322 }323 // 检查是否有模块行为信息324 $action = Db::name('admin_action')->where('module', $name)->field('module,name,title,remark,rule,log,status')->select();325 if ($action) {326 $module_info['action'] = $action;327 }328 // 表前缀329 $module_info['database_prefix'] = config('database.prefix');330 // 生成配置文件331 if (false === $this->buildInfoFile($module_info, $name)) {332 $this->error('模块配置文件创建失败,请重新导出');333 }334 // 获取模型菜单并导出335 $fields = 'id,pid,title,icon,url_type,url_value,url_target,online_hide,sort,status';336 $menus = MenuModel::getMenusByGroup($name, $fields);337 if (false === $this->buildMenuFile($menus, $name)) {338 $this->error('模型菜单文件创建失败,请重新导出');339 }340 // 导出数据库表341 if (isset($module_info['tables']) && !empty($module_info['tables'])) {342 if (!is_dir($module_dir . '/sql')) {343 mkdir($module_dir . '/sql', 644, true);344 }345 if (!Database::export($module_info['tables'], $module_dir . '/sql/install.sql', config('database.prefix'), $export_data)) {346 $this->error('数据库文件创建失败,请重新导出');347 }348 if (!Database::exportUninstall($module_info['tables'], $module_dir . '/sql/uninstall.sql', config('database.prefix'))) {349 $this->error('数据库文件创建失败,请重新导出');350 }351 }352 // 记录行为353 action_log('module_export', 'admin_module', 0, UID, $module_info['title']);354 // 打包下载355 $archive = new PHPZip;356 return $archive->ZipAndDownload($module_dir, $name);357 }358 /**359 * 创建模块菜单文件360 * @param array $menus 菜单361 * @param string $name 模块名362 * @return int363 */364 private function buildMenuFile($menus = [], $name = '')365 {366 $menus = Tree::toLayer($menus);367 // 美化数组格式...

Full Screen

Full Screen

so_sociallogin.php

Source:so_sociallogin.php Github

copy

Full Screen

...178 179 $data['cancel'] = $this->url->link('marketplace/extension', 'user_token=' . $this->session->data['user_token'] . '&type=module', true);180 181 if (isset($this->request->get['module_id']) && ($this->request->server['REQUEST_METHOD'] != 'POST')) {182 // $module_info = $this->model_setting_module->getModule($this->request->get['module_id']);183 $module_info = $this->model_setting_setting->getSetting('so_sociallogin');184 }185 else186 $module_info = $this->model_setting_setting->getSetting('so_sociallogin');187 188 $params = isset($this->request->post['so_sociallogin']) ? $this->request->post['so_sociallogin'] : array();189 if (isset($params['so_sociallogin_name'])) {190 $data['name'] = $params['so_sociallogin_name'];191 } elseif (!empty($module_info)) {192 $data['name'] = isset($module_info['so_sociallogin_name']) ? $module_info['so_sociallogin_name'] : '';193 } else {194 $data['name'] = '';195 }196 if (isset($params['so_sociallogin_button'])) {197 $data['button_social'] = $params['so_sociallogin_button'];198 } elseif (!empty($module_info)) {199 $data['button_social'] = isset($module_info['so_sociallogin_button']) ? $module_info['so_sociallogin_button'] : '';200 } else {201 $data['button_social'] = '';202 }203 if (isset($params['so_sociallogin_popuplogin'])) {204 $data['popuplogin'] = $params['so_sociallogin_popuplogin'];205 } elseif (!empty($module_info)) {206 $data['popuplogin'] = isset($module_info['so_sociallogin_popuplogin']) ? $module_info['so_sociallogin_popuplogin'] : '';207 } else {208 $data['popuplogin'] = '';209 }210 if (isset($params['so_sociallogin_fbtitle'])) {211 $data['fbtitle'] = $params['so_sociallogin_fbtitle'];212 } elseif (!empty($module_info)) {213 $data['fbtitle'] = isset($module_info['so_sociallogin_fbtitle']) ? $module_info['so_sociallogin_fbtitle'] : '';214 } else {215 $data['fbtitle'] = '';216 }217 218 if (isset($params['so_sociallogin_twittertitle'])) {219 $data['twittertitle'] = $params['so_sociallogin_twittertitle'];220 } elseif (!empty($module_info)) {221 $data['twittertitle'] = isset($module_info['so_sociallogin_twittertitle']) ? $module_info['so_sociallogin_twittertitle'] : '';222 } else {223 $data['twittertitle'] = '';224 }225 226 if (isset($params['so_sociallogin_googletitle'])) {227 $data['googletitle'] = $params['so_sociallogin_googletitle'];228 } elseif (!empty($module_info)) {229 $data['googletitle'] = isset($module_info['so_sociallogin_googletitle']) ? $module_info['so_sociallogin_googletitle'] : '';230 } else {231 $data['googletitle'] = '';232 }233 234 if (isset($params['so_sociallogin_linkedintitle'])) {235 $data['linkedintitle'] = $params['so_sociallogin_linkedintitle'];236 } elseif (!empty($module_info)) {237 $data['linkedintitle'] = isset($module_info['so_sociallogin_linkedintitle']) ? $module_info['so_sociallogin_linkedintitle'] : '';238 } else {239 $data['linkedintitle'] = '';240 }241 242 243 if (isset($params['so_sociallogin_width'])) {244 $data['width'] = $params['so_sociallogin_width'];245 } elseif (!empty($module_info)) {246 $data['width'] = isset($module_info['so_sociallogin_width']) ? $module_info['so_sociallogin_width'] : '';247 } else {248 $data['width'] = '100';249 }250 251 if (isset($params['so_sociallogin_height'])) {252 $data['height'] = $params['so_sociallogin_height'];253 } elseif (!empty($module_info)) {254 $data['height'] = isset($module_info['so_sociallogin_height']) ? $module_info['so_sociallogin_height'] : '';255 } else {256 $data['height'] = '100';257 }258 259 if (isset($params['so_sociallogin_enable'])) {260 $data['status'] = $params['so_sociallogin_enable'];261 } elseif (!empty($module_info)) {262 $data['status'] = isset($module_info['so_sociallogin_enable']) ? $module_info['so_sociallogin_enable'] : '';263 } else {264 $data['status'] = 0;265 }266 267 if (isset($params['so_sociallogin_fbstatus'])) {268 $data['fbstatus'] = $params['so_sociallogin_fbstatus'];269 } elseif (!empty($module_info)) {270 $data['fbstatus'] = isset($module_info['so_sociallogin_fbstatus']) ? $module_info['so_sociallogin_fbstatus'] : '';271 } else {272 $data['fbstatus'] = '';273 }274 275 if (isset($params['so_sociallogin_twitstatus'])) {276 $data['twitstatus'] = $params['so_sociallogin_twitstatus'];277 } elseif (!empty($module_info)) {278 $data['twitstatus'] = isset($module_info['so_sociallogin_twitstatus']) ? $module_info['so_sociallogin_twitstatus'] : '';279 } else {280 $data['twitstatus'] = '';281 }282 283 if (isset($params['so_sociallogin_googlestatus'])) {284 $data['googlestatus'] = $params['so_sociallogin_googlestatus'];285 } elseif (!empty($module_info)) {286 $data['googlestatus'] = isset($module_info['so_sociallogin_googlestatus']) ? $module_info['so_sociallogin_googlestatus'] : '';287 } else {288 $data['googlestatus'] = '';289 }290 291 if (isset($params['so_sociallogin_linkstatus'])) {292 $data['linkstatus'] = $params['so_sociallogin_linkstatus'];293 } elseif (!empty($module_info)) {294 $data['linkstatus'] = isset($module_info['so_sociallogin_linkstatus']) ? $module_info['so_sociallogin_linkstatus'] : '';295 } else {296 $data['linkstatus'] = '';297 }298 299 if (isset($params['so_sociallogin_fbimage'])) {300 $data['fbimage'] = $params['so_sociallogin_fbimage'];301 } elseif (!empty($module_info)) {302 $data['fbimage'] = isset($module_info['so_sociallogin_fbimage']) ? $module_info['so_sociallogin_fbimage'] : '';303 } else {304 $data['fbimage'] = '';305 }306 307 308 if (isset($params['so_sociallogin_twitimage'])) {309 $data['twitimage'] = $params['so_sociallogin_twitimage'];310 } elseif (!empty($module_info)) {311 $data['twitimage'] = isset($module_info['so_sociallogin_twitimage']) ? $module_info['so_sociallogin_twitimage'] : '';312 } else {313 $data['twitimage'] = '';314 }315 316 317 if (isset($params['so_sociallogin_googleimage'])) {318 $data['googleimage'] = $params['so_sociallogin_googleimage'];319 } elseif (!empty($module_info)) {320 $data['googleimage'] = isset($module_info['so_sociallogin_googleimage']) ? $module_info['so_sociallogin_googleimage'] : '';321 } else {322 $data['googleimage'] = '';323 }324 325 if (isset($params['so_sociallogin_linkdinimage'])) {326 $data['linkdinimage'] = $params['so_sociallogin_linkdinimage'];327 } elseif (!empty($module_info)) {328 $data['linkdinimage'] = isset($module_info['so_sociallogin_linkdinimage']) ? $module_info['so_sociallogin_linkdinimage'] : '';329 } else {330 $data['linkdinimage'] = '';331 }332 333 if (isset($params['so_sociallogin_fbapikey'])) {334 $data['fbapikey'] = $params['so_sociallogin_fbapikey'];335 } elseif (!empty($module_info)) {336 $data['fbapikey'] = isset($module_info['so_sociallogin_fbapikey']) ? $module_info['so_sociallogin_fbapikey'] : '';337 } else {338 $data['fbapikey'] = '';339 }340 341 if (isset($params['so_sociallogin_fbsecretapi'])) {342 $data['fbsecretapi'] = $params['so_sociallogin_fbsecretapi'];343 } elseif (!empty($module_info)) {344 $data['fbsecretapi'] = isset($module_info['so_sociallogin_fbsecretapi']) ? $module_info['so_sociallogin_fbsecretapi'] : '';345 } else {346 $data['fbsecretapi'] = '';347 }348 349 if (isset($params['so_sociallogin_twitapikey'])) {350 $data['twitapikey'] = $params['so_sociallogin_twitapikey'];351 } elseif (!empty($module_info)) {352 $data['twitapikey'] = isset($module_info['so_sociallogin_twitapikey']) ? $module_info['so_sociallogin_twitapikey'] : '';353 } else {354 $data['twitapikey'] = '';355 }356 357 if (isset($params['so_sociallogin_twitsecretapi'])) {358 $data['twitsecretapi'] = $params['so_sociallogin_twitsecretapi'];359 } elseif (!empty($module_info)) {360 $data['twitsecretapi'] = isset($module_info['so_sociallogin_twitsecretapi']) ? $module_info['so_sociallogin_twitsecretapi'] : '';361 } else {362 $data['twitsecretapi'] = '';363 }364 365 if (isset($params['so_sociallogin_googleapikey'])) {366 $data['googleapikey'] = $params['so_sociallogin_googleapikey'];367 } elseif (!empty($module_info)) {368 $data['googleapikey'] = isset($module_info['so_sociallogin_googleapikey']) ? $module_info['so_sociallogin_googleapikey'] : '';369 } else {370 $data['googleapikey'] = '';371 }372 373 if (isset($params['so_sociallogin_googlesecretapi'])) {374 $data['googlesecretapi'] = $params['so_sociallogin_googlesecretapi'];375 } elseif (!empty($module_info)) {376 $data['googlesecretapi'] = isset($module_info['so_sociallogin_googlesecretapi']) ? $module_info['so_sociallogin_googlesecretapi'] : '';377 } else {378 $data['googlesecretapi'] = '';379 }380 if (isset($params['so_sociallogin_linkdinapikey'])) {381 $data['linkdinapikey'] = $params['so_sociallogin_linkdinapikey'];382 } elseif (!empty($module_info)) {383 $data['linkdinapikey'] = isset($module_info['so_sociallogin_linkdinapikey']) ? $module_info['so_sociallogin_linkdinapikey'] : '';384 } else {385 $data['linkdinapikey'] = '';386 }387 388 if (isset($params['so_sociallogin_linkdinsecretapi'])) {389 $data['linkdinsecretapi'] = $params['so_sociallogin_linkdinsecretapi'];390 } elseif (!empty($module_info)) {391 $data['linkdinsecretapi'] = isset($module_info['so_sociallogin_linkdinsecretapi']) ? $module_info['so_sociallogin_linkdinsecretapi'] : '';392 } else {393 $data['linkdinsecretapi'] = '';394 }395 396 397 $this->load->model('tool/image');398 if (isset($params['so_sociallogin_fbimage']) && is_file(DIR_IMAGE . $params['so_sociallogin_fbimage'])) {399 $data['fbthumb'] = $this->model_tool_image->resize($params['so_sociallogin_fbimage'], 100, 100);400 } elseif (!empty($module_info) && is_file(DIR_IMAGE . $module_info['so_sociallogin_fbimage'])) {401 $data['fbthumb'] = $this->model_tool_image->resize($module_info['so_sociallogin_fbimage'], 100, 100);402 } else {403 $data['fbthumb'] = $this->model_tool_image->resize('no_image.png', 100, 100);404 }405 406 if (isset($params['so_sociallogin_twitimage']) && is_file(DIR_IMAGE . $params['so_sociallogin_twitimage'])) {407 $data['twiterthumb'] = $this->model_tool_image->resize($params['so_sociallogin_twitimage'], 100, 100);408 } elseif (!empty($module_info) && is_file(DIR_IMAGE . $module_info['so_sociallogin_twitimage'])) {409 $data['twiterthumb'] = $this->model_tool_image->resize($module_info['so_sociallogin_twitimage'], 100, 100);410 } else {411 $data['twiterthumb'] = $this->model_tool_image->resize('no_image.png', 100, 100);412 }413 414 if (isset($params['so_sociallogin_googleimage']) && is_file(DIR_IMAGE . $params['so_sociallogin_googleimage'])) {415 $data['googlethumb'] = $this->model_tool_image->resize($params['so_sociallogin_googleimage'], 100, 100);416 } elseif (!empty($module_info) && is_file(DIR_IMAGE . $module_info['so_sociallogin_googleimage'])) {417 $data['googlethumb'] = $this->model_tool_image->resize($module_info['so_sociallogin_googleimage'], 100, 100);418 } else {419 $data['googlethumb'] = $this->model_tool_image->resize('no_image.png', 100, 100);420 }421 if (isset($params['so_sociallogin_linkdinimage']) && is_file(DIR_IMAGE . $params['so_sociallogin_linkdinimage'])) {422 $data['linkdinthumb'] = $this->model_tool_image->resize($params['so_sociallogin_linkdinimage'], 100, 100);423 } elseif (!empty($module_info) && is_file(DIR_IMAGE . $module_info['so_sociallogin_linkdinimage'])) {424 $data['linkdinthumb'] = $this->model_tool_image->resize($module_info['so_sociallogin_linkdinimage'], 100, 100);425 } else {426 $data['linkdinthumb'] = $this->model_tool_image->resize('no_image.png', 100, 100);427 }428 $data['placeholder'] = $this->model_tool_image->resize('no_image.png', 100, 100);429 430 431 $data['header'] = $this->load->controller('common/header');432 $data['column_left'] = $this->load->controller('common/column_left');433 $data['footer'] = $this->load->controller('common/footer');434 $this->response->setOutput($this->load->view('extension/module/so_sociallogin', $data));435 }436 protected function validate() {437 if (!$this->user->hasPermission('modify', 'extension/module/so_sociallogin')) {438 $this->error['warning'] = $this->language->get('error_permission');...

Full Screen

Full Screen

module_info

Using AI Code Generation

copy

Full Screen

1require_once('pts-core/pts-core.php');2$module = new pts_module_info('module_name');3echo $module->get_module_name();4echo $module->get_module_version();5echo $module->get_module_description();6echo $module->get_module_author();7echo $module->get_module_type();

Full Screen

Full Screen

module_info

Using AI Code Generation

copy

Full Screen

1require_once('pts-core/pts-core.php');2$module_info = new module_info();3$module_info->module_name = 'Phoronix Test Suite';4$module_info->module_version = '2.0.0';5$module_info->module_author = 'Michael Larabel';6$module_info->module_description = 'Phoronix Test Suite is an open-source automated testing and benchmarking platform.';7$module_info->module_license = 'GPLv3';8$module_info->module_type = 'Benchmark';9$module_info->module_is_downloadable = false;10$module_info->module_is_installable = true;11$module_info->module_install_path = 'phoronix-test-suite';12$module_info->module_install_with_sudo = false;13$module_info->module_install_command = 'sudo ./install-sh';14$module_info->module_install_file_path = 'install-sh';15$module_info->module_install_append_command = 'sudo apt-get install -f';16$module_info->module_uninstall_command = 'sudo apt-get remove phoronix-test-suite';17$module_info->module_run_command = 'phoronix-test-suite';18$module_info->module_run_as_root = false;19$module_info->module_test_file_path = 'phoronix-test-suite';20$module_info->module_test_command = 'phoronix-test-suite';21require_once('pts-core/pts-core.php');22$module_info = new module_info();23$module_info->module_name = 'Phoronix Test Suite';24$module_info->module_version = '2.0.0';25$module_info->module_author = 'Michael Larabel';26$module_info->module_description = 'Phoronix Test Suite is an open-source automated testing and benchmarking platform.';27$module_info->module_license = 'GPLv3';

Full Screen

Full Screen

module_info

Using AI Code Generation

copy

Full Screen

1require_once('pts-core.php');2$module = new module_info();3$module->module_name = "test";4$module->module_version = "1.0";5$module->module_author = "test";6$module->module_description = "test";7$module->module_type = "test";8$module->module_license = "GPL";9$module->module_identifier = "test";10$module->module_url = "test";11$module->module_install_path = "test";12$module->module_install_time = "test";13$module->module_update_time = "test";14$module->module_update_version = "test";15$module->module_update_path = "test";16$module->module_update_identifier = "test";17$module->module_update_url = "test";18$module->module_update_description = "test";19$module->module_update_license = "test";20$module->module_update_author = "test";21$module->module_update_install_path = "test";22$module->module_update_install_time = "test";23$module->module_update_install_identifier = "test";24$module->module_update_install_url = "test";25$module->module_update_install_description = "test";26$module->module_update_install_license = "test";27$module->module_update_install_author = "test";28$module->module_update_install_install_path = "test";29$module->module_update_install_install_time = "test";30$module->module_update_install_install_identifier = "test";31$module->module_update_install_install_url = "test";32$module->module_update_install_install_description = "test";33$module->module_update_install_install_license = "test";34$module->module_update_install_install_author = "test";35$module->module_update_install_install_install_path = "test";36$module->module_update_install_install_install_time = "test";37$module->module_update_install_install_install_identifier = "test";38$module->module_update_install_install_install_url = "test";39$module->module_update_install_install_install_description = "test";40$module->module_update_install_install_install_license = "test";41$module->module_update_install_install_install_author = "test";42$module->module_update_install_install_install_install_path = "test";43$module->module_update_install_install_install_install_time = "test";44$module->module_update_install_install_install_install_identifier = "test";45$module->module_update_install_install_install_install_url = "test";

Full Screen

Full Screen

module_info

Using AI Code Generation

copy

Full Screen

1require_once('pts-core.php');2$module_info = new module_info();3$module_info->display_module_info('2');4require_once('pts-core.php');5$module_info = new module_info();6$module_info->display_module_info('3');7require_once('pts-core.php');8$module_info = new module_info();9$module_info->display_module_info('4');10require_once('pts-core.php');11$module_info = new module_info();12$module_info->display_module_info('5');13require_once('pts-core.php');14$module_info = new module_info();15$module_info->display_module_info('6');16require_once('pts-core.php');17$module_info = new module_info();18$module_info->display_module_info('7');19require_once('pts-core.php');20$module_info = new module_info();21$module_info->display_module_info('8');22require_once('pts-core.php');23$module_info = new module_info();24$module_info->display_module_info('9');25require_once('pts-core.php');26$module_info = new module_info();27$module_info->display_module_info('10');28require_once('pts-core.php');29$module_info = new module_info();30$module_info->display_module_info('11');31require_once('pts-core.php');32$module_info = new module_info();33$module_info->display_module_info('12');

Full Screen

Full Screen

module_info

Using AI Code Generation

copy

Full Screen

1require_once('pts-core.php');2$module = new module_info();3$module->load_module('pts-core');4echo $module->module_name;5echo $module->module_version;6echo $module->module_description;7echo $module->module_author;8echo $module->module_license;9echo $module->module_url;10echo $module->module_test_profile;11echo $module->module_test_profile_version;12echo $module->module_test_profile_description;13echo $module->module_test_profile_license;14echo $module->module_test_profile_url;15echo $module->module_test_profile_phoromatic;16echo $module->module_test_profile_result_scale;17echo $module->module_test_profile_result_proportion;18echo $module->module_test_profile_display_format;19echo $module->module_test_profile_result_precision;20echo $module->module_test_profile_result_identifier;21echo $module->module_test_profile_result_merge;22echo $module->module_test_profile_installation;23echo $module->module_test_profile_installation_size;24echo $module->module_test_profile_installation_md5;25echo $module->module_test_profile_installation_sha1;26echo $module->module_test_profile_installation_sha256;27echo $module->module_test_profile_installation_sha512;28echo $module->module_test_profile_installation_filesize;29echo $module->module_test_profile_installation_filesize_bytes;30echo $module->module_test_profile_installation_filesize_human_readable;31echo $module->module_test_profile_installation_filesize_human_readable_long;32echo $module->module_test_profile_installation_filesize_human_readable_long_with_bytes;33echo $module->module_test_profile_installation_filesize_human_readable_short;34echo $module->module_test_profile_installation_filesize_human_readable_short_with_bytes;35echo $module->module_test_profile_installation_filesize_human_readable_short_with_bytes_and_parenthesis;36echo $module->module_test_profile_installation_filesize_human_readable_short_with_parenthesis;37echo $module->module_test_profile_installation_filesize_human_readable_with_bytes;38echo $module->module_test_profile_installation_filesize_human_readable_with_parenthesis;39echo $module->module_test_profile_installation_filesize_human_readable_with_parenthesis_bytes;40echo $module->module_test_profile_installation_filesize_human_readable_with_parenthesis_bytes_long;41echo $module->module_test_profile_installation_filesize_human_readable_with_parenthesis_bytes_short;

Full Screen

Full Screen

module_info

Using AI Code Generation

copy

Full Screen

1$module_info = new module_info();2$module_name = $module_info->get_module_name();3$module_version = $module_info->get_module_version();4$module_description = $module_info->get_module_description();5$module_author = $module_info->get_module_author();6$module_website = $module_info->get_module_website();7$module_license = $module_info->get_module_license();8$module_dependency = $module_info->get_module_dependency();9$module_optional_dependency = $module_info->get_module_optional_dependency();10$module_installed_size = $module_info->get_module_installed_size();11$module_maintainer = $module_info->get_module_maintainer();12$module_section = $module_info->get_module_section();13$module_installed_size = $module_info->get_module_installed_size();14$module_installed_size = $module_info->get_module_installed_size();15$module_installed_size = $module_info->get_module_installed_size();16$module_installed_size = $module_info->get_module_installed_size();17$module_info = new module_info();18$module_name = $module_info->get_module_name();19$module_version = $module_info->get_module_version();20$module_description = $module_info->get_module_description();21$module_author = $module_info->get_module_author();22$module_website = $module_info->get_module_website();23$module_license = $module_info->get_module_license();24$module_dependency = $module_info->get_module_dependency();25$module_optional_dependency = $module_info->get_module_optional_dependency();26$module_installed_size = $module_info->get_module_installed_size();

Full Screen

Full Screen

module_info

Using AI Code Generation

copy

Full Screen

1include('module_info.php');2$module = new module_info();3$module->set_module_name("test");4$module->set_module_version("1.0");5$module->set_module_author("test");6$module->set_module_description("test");7$module->set_module_license("test");8$module->set_module_url("test");9echo $module->get_module_info();10include('module_info.php');11$module = new module_info();12$module->set_module_name("test");13$module->set_module_version("1.0");14$module->set_module_author("test");15$module->set_module_description("test");16$module->set_module_license("test");17$module->set_module_url("test");18echo $module->get_module_info();19include('module_info.php');20$module = new module_info();21$module->set_module_name("test");22$module->set_module_version("1.0");23$module->set_module_author("test");24$module->set_module_description("test");25$module->set_module_license("test");26$module->set_module_url("test");27echo $module->get_module_info();28include('module_info.php');29$module = new module_info();30$module->set_module_name("test");31$module->set_module_version("1.0");32$module->set_module_author("test");33$module->set_module_description("test");34$module->set_module_license("test");35$module->set_module_url("test");36echo $module->get_module_info();37include('module_info.php');38$module = new module_info();39$module->set_module_name("test");40$module->set_module_version("1.0");41$module->set_module_author("test");42$module->set_module_description("test");43$module->set_module_license("test");44$module->set_module_url("test");45echo $module->get_module_info();

Full Screen

Full Screen

module_info

Using AI Code Generation

copy

Full Screen

1require_once('pts-core/pts-core.php');2$module = new pts_module_info('2.php', '2');3echo $module->get_module_info('name');4echo $module->get_module_info('description');5echo $module->get_module_info('author');6echo $module->get_module_info('version');7echo $module->get_module_info('license');8echo $module->get_module_info('website');9echo $module->get_module_info('tags');10echo $module->get_module_info('type');11echo $module->get_module_info('status');12echo $module->get_module_info('dependencies');13echo $module->get_module_info('supported_platforms');14echo $module->get_module_info('supported_os');15echo $module->get_module_info('supported_arch');16echo $module->get_module_info('supported_phoronix_version');17echo $module->get_module_info('supported_php_version');18echo $module->get_module_info('supported_db_version');19echo $module->get_module_info('supported_phoronix_version');20echo $module->get_module_info('supported_php_version');21echo $module->get_module_info('supported_db_version');22echo $module->get_module_info('supported_phoronix_version');23echo $module->get_module_info('supported_php_version');24echo $module->get_module_info('supported_db_version');25echo $module->get_module_info('supported_phoronix_version');26echo $module->get_module_info('supported_php_version');27echo $module->get_module_info('supported_db_version');28echo $module->get_module_info('supported_phoronix_version');29echo $module->get_module_info('supported_php_version');30echo $module->get_module_info('supported_db_version');31echo $module->get_module_info('supported_phoronix_version');32echo $module->get_module_info('supported_php_version');33echo $module->get_module_info('supported_db_version');34echo $module->get_module_info('supported_phoronix_version');35echo $module->get_module_info('supported_php_version');36echo $module->get_module_info('supported_db_version');37echo $module->get_module_info('supported_phoronix_version');38echo $module->get_module_info('supported_php_version');39echo $module->get_module_info('supported_db_version');40echo $module->get_module_info('supported_phoronix_version');41echo $module->get_module_info('supported_php_version');42echo $module->get_module_info('supported_db_version

Full Screen

Full Screen

module_info

Using AI Code Generation

copy

Full Screen

1$module = new module_info();2$mod = $module->get_name();3echo $mod;4$module = new module_info();5$mod = $module->get_name();6echo $mod;7$module = new module_info();8$mod = $module->get_name();9echo $mod;10$module = new module_info();11$mod = $module->get_name();12echo $mod;13$module = new module_info();14$mod = $module->get_name();15echo $mod;16$module = new module_info();17$mod = $module->get_name();18echo $mod;19$module = new module_info();20$mod = $module->get_name();21echo $mod;22$module = new module_info();23$mod = $module->get_name();24echo $mod;25$module = new module_info();26$mod = $module->get_name();27echo $mod;28$module = new module_info();29$mod = $module->get_name();30echo $mod;

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run Phoronix-test-suite automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Most used methods in module_info

Run Selenium Automation Tests on LambdaTest Cloud Grid

Trigger Selenium automation tests on a cloud-based Grid of 3000+ real browsers and operating systems.

Test now for Free

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful