當前位置: 首頁>>代碼示例>>PHP>>正文


PHP project_cache_row函數代碼示例

本文整理匯總了PHP中project_cache_row函數的典型用法代碼示例。如果您正苦於以下問題:PHP project_cache_row函數的具體用法?PHP project_cache_row怎麽用?PHP project_cache_row使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了project_cache_row函數的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: mc_projects_get_user_accessible

/**
 * Get all projects accessible by the given user.
 *
 * @param string $p_username  The name of the user trying to access the project list.
 * @param string $p_password  The password of the user.
 * @return Array  suitable to be converted into a ProjectDataArray
 */
function mc_projects_get_user_accessible($p_username, $p_password)
{
    $t_user_id = mci_check_login($p_username, $p_password);
    if ($t_user_id === false) {
        return mci_soap_fault_login_failed();
    }
    if (!mci_has_readonly_access($t_user_id)) {
        return mci_soap_fault_access_denied($t_user_id);
    }
    $t_lang = mci_get_user_lang($t_user_id);
    $t_result = array();
    foreach (user_get_accessible_projects($t_user_id) as $t_project_id) {
        $t_project_row = project_cache_row($t_project_id);
        $t_project = array();
        $t_project['id'] = $t_project_id;
        $t_project['name'] = $t_project_row['name'];
        $t_project['status'] = mci_enum_get_array_by_id($t_project_row['status'], 'project_status', $t_lang);
        $t_project['enabled'] = $t_project_row['enabled'];
        $t_project['view_state'] = mci_enum_get_array_by_id($t_project_row['view_state'], 'project_view_state', $t_lang);
        $t_project['access_min'] = mci_enum_get_array_by_id($t_project_row['access_min'], 'access_levels', $t_lang);
        $t_project['file_path'] = array_key_exists('file_path', $t_project_row) ? $t_project_row['file_path'] : "";
        $t_project['description'] = array_key_exists('description', $t_project_row) ? $t_project_row['description'] : "";
        $t_project['subprojects'] = mci_user_get_accessible_subprojects($t_user_id, $t_project_id, $t_lang);
        $t_result[] = $t_project;
    }
    return $t_result;
}
開發者ID:kaos,項目名稱:mantisbt,代碼行數:34,代碼來源:mc_project_api.php

示例2: mci_user_get_accessible_subprojects

/**
 * Gets the sub-projects that are accessible to the specified user / project.
 * @param integer $p_user_id           User id.
 * @param integer $p_parent_project_id Parent Project id.
 * @param string  $p_lang              Language string.
 * @return array
 */
function mci_user_get_accessible_subprojects($p_user_id, $p_parent_project_id, $p_lang = null)
{
    if ($p_lang === null) {
        $t_lang = mci_get_user_lang($p_user_id);
    } else {
        $t_lang = $p_lang;
    }
    $t_result = array();
    foreach (user_get_accessible_subprojects($p_user_id, $p_parent_project_id) as $t_subproject_id) {
        $t_subproject_row = project_cache_row($t_subproject_id);
        $t_subproject = array();
        $t_subproject['id'] = $t_subproject_id;
        $t_subproject['name'] = $t_subproject_row['name'];
        $t_subproject['status'] = mci_enum_get_array_by_id($t_subproject_row['status'], 'project_status', $t_lang);
        $t_subproject['enabled'] = $t_subproject_row['enabled'];
        $t_subproject['view_state'] = mci_enum_get_array_by_id($t_subproject_row['view_state'], 'project_view_state', $t_lang);
        $t_subproject['access_min'] = mci_enum_get_array_by_id($t_subproject_row['access_min'], 'access_levels', $t_lang);
        $t_subproject['file_path'] = array_key_exists('file_path', $t_subproject_row) ? $t_subproject_row['file_path'] : '';
        $t_subproject['description'] = array_key_exists('description', $t_subproject_row) ? $t_subproject_row['description'] : '';
        $t_subproject['subprojects'] = mci_user_get_accessible_subprojects($p_user_id, $t_subproject_id, $t_lang);
        $t_result[] = $t_subproject;
    }
    return $t_result;
}
開發者ID:elmarculino,項目名稱:mantisbt,代碼行數:31,代碼來源:mc_api.php

示例3: project_get_row

function project_get_row($p_project_id, $p_trigger_errors = true)
{
    return project_cache_row($p_project_id, $p_trigger_errors);
}
開發者ID:Kirill,項目名稱:mantisbt,代碼行數:4,代碼來源:project_api.php

示例4: project_get_row

function project_get_row($p_project_id)
{
    return project_cache_row($p_project_id);
}
開發者ID:amjadtbssm,項目名稱:website,代碼行數:4,代碼來源:project_api.php


注:本文中的project_cache_row函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。