本文整理汇总了PHP中Extension::get_folder方法的典型用法代码示例。如果您正苦于以下问题:PHP Extension::get_folder方法的具体用法?PHP Extension::get_folder怎么用?PHP Extension::get_folder使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Extension
的用法示例。
在下文中一共展示了Extension::get_folder方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: io_handler
/**
* @param string $alias
* @throws BaseExtensionClassNotFoundException
* @throws BaseExtensionFileNotFoundException
*/
public static function io_handler($alias)
{
if ($_GET['extension']) {
$extension = new Extension($_GET['extension']);
$main_file = constant("EXTENSION_DIR") . "/" . $extension->get_folder() . "/" . $extension->get_main_file();
$main_class = $extension->get_class();
if (file_exists($main_file)) {
require_once $main_file;
if (class_exists($main_class)) {
$main_class::main();
} else {
throw new BaseExtensionClassNotFoundException();
}
} else {
throw new BaseExtensionFileNotFoundException();
}
} else {
require_once "io/extension.io.php";
ExtensionIO::home();
}
}
示例2: io_handler
//.........这里部分代码省略.........
// Administration - Permission
case "admin_permission":
require_once "io/project_admin.io.php";
$project_admin_io = new ProjectAdminIO();
ProjectAdminIO::permission();
break;
case "admin_permission_add_user":
require_once "io/project_admin.io.php";
ProjectAdminIO::permission_add_user();
break;
case "admin_permission_add_group":
require_once "io/project_admin.io.php";
ProjectAdminIO::permission_add_group();
break;
case "admin_permission_add_ou":
require_once "io/project_admin.io.php";
ProjectAdminIO::permission_add_organisation_unit();
break;
case "admin_permission_edit":
require_once "io/project_admin.io.php";
ProjectAdminIO::permission_edit();
break;
case "admin_permission_delete":
require_once "io/project_admin.io.php";
ProjectAdminIO::permission_delete();
break;
// Item Lister
// Item Lister
case "item_list":
if ($project_security->is_access(1, false) == true) {
if ($_GET['dialog']) {
if ($_GET['dialog'] == "data") {
$path_stack_array = array();
$folder_id = ProjectFolder::get_folder_by_project_id($_GET['project_id']);
$folder = Folder::get_instance($folder_id);
$init_array = $folder->get_object_id_path();
foreach ($init_array as $key => $value) {
$temp_array = array();
$temp_array['virtual'] = false;
$temp_array['id'] = $value;
array_unshift($path_stack_array, $temp_array);
}
if (!$_GET['folder_id']) {
$session->write_value("stack_array", $path_stack_array, true);
}
}
$module_dialog = ModuleDialog::get_by_type_and_internal_name("item_list", $_GET['dialog']);
if (file_exists($module_dialog['class_path'])) {
require_once $module_dialog['class_path'];
if (class_exists($module_dialog['class'])) {
if (method_exists($module_dialog['class'], $module_dialog['method'])) {
$module_dialog['class']::$module_dialog['method']("project", $_GET['project_id'], true);
} else {
throw new BaseModuleDialogMethodNotFoundException();
}
} else {
throw new BaseModuleDialogClassNotFoundException();
}
} else {
throw new BaseModuleDialogFileNotFoundException();
}
} else {
throw new BaseModuleDialogMissingException();
}
} else {
throw new ProjectSecurityAccessDeniedException();
示例3: ajax
/**
* Main Controller for requests via ajax.php
* @throws BaseModuleControllerClassNotFoundException
* @throws BaseModuleControllerFileNotFoundException
* @throws BaseExtensionClassNotFoundException
* @throws BaseExtensionFileNotFoundException
* @throws BaseExtensionNotFoundException
* @throws BaseModuleIllegalControllerCallException
*/
public static function ajax()
{
global $session;
try {
$session_valid_array = $session->is_valid();
if ($session_valid_array[0] === true) {
if ($_GET['nav']) {
$module_controller_array = SystemHandler::get_module_controller($_GET['nav']);
$module_controller_path = "core/modules/" . $module_controller_array['path'];
if (file_exists($module_controller_path)) {
require_once $module_controller_path;
if (class_exists($module_controller_array['class'])) {
$module_controller_array['class']::ajax_handler($module_controller_array['alias']);
} else {
throw new BaseModuleControllerClassNotFoundException();
}
} else {
throw new BaseModuleControllerFileNotFoundException();
}
} elseif ($_GET['extension']) {
$extension_id = Extension::get_id_by_identifier($_GET['extension']);
if (is_numeric($extension_id)) {
$extension = new Extension($extension_id);
$extension_class = $extension->get_class();
$extension_file = constant("EXTENSION_DIR") . "/" . $extension->get_folder() . "/" . $extension->get_main_file();
if (file_exists($extension_file)) {
require_once $extension_file;
if (class_exists($extension_class)) {
$extension_class::ajax();
} else {
throw new BaseExtensionClassNotFoundException();
}
} else {
throw new BaseExtensionFileNotFoundException();
}
} else {
throw new BaseExtensionNotFoundException();
}
} else {
throw new BaseModuleIllegalControllerCallException();
}
} else {
if ($_GET['nav'] == "base" and $_GET['run'] == "login" or $_GET['nav'] == "base" and $_GET['run'] == "forgot_password" or $_GET['run'] == "cron" or $_GET['nav'] == "base" and $_GET['run'] == "logout" and $session->is_dead() == true) {
require_once "core/modules/base/base.request.php";
BaseRequest::ajax_handler(null);
}
}
} catch (DatabaseQueryFailedException $e) {
echo "EXCEPTION: DatabaseQueryFailedException";
} catch (BaseException $e) {
$error_io = new Error_IO($e);
echo "EXCEPTION: " . $error_io->get_error_message();
}
}