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


PHP thesaurus::get_parent方法代碼示例

本文整理匯總了PHP中thesaurus::get_parent方法的典型用法代碼示例。如果您正苦於以下問題:PHP thesaurus::get_parent方法的具體用法?PHP thesaurus::get_parent怎麽用?PHP thesaurus::get_parent使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在thesaurus的用法示例。


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

示例1: parent_num

 function parent_num($descriptorID)
 {
     $tempArray = thesaurus::get_parent($descriptorID);
     if ($tempArray) {
         return count($tempArray);
     } else {
         return FALSE;
     }
 }
開發者ID:nibble-arts,項目名稱:openthesaurus,代碼行數:9,代碼來源:thesaurus.php

示例2: record

function record($id, $termType)
{
    $uses = "";
    $term = thesaurus::get_name($id);
    $uses = extract_pattern($term, "/\\(BS[: ](?<use>.*)\\)/");
    $recordArray = array();
    $record = new simpleXmlElement("<record />");
    // check if term already exists
    // define array for record creation
    $recordArray['input.name'] = "Thesaurus Redaktion";
    $recordArray['input.date'] = date("Y-m-d", time());
    $recordArray['input.time'] = date("h:i:s", time());
    $recordArray['term.type'] = $termType;
    $recordArray['term.status'] = thesaurus::get_status_name(thesaurus::get_status($id));
    $recordArray['term'] = $term;
    $recordArray['notes'] = thesaurus::get_comment($id);
    $recordArray['broader_term'] = thesaurus::get_parent($id);
    //  $recordArray['narrower_term'] = thesaurus::get_child($id);
    $recordArray['related_term'] = thesaurus::get_assoc($id);
    $recordArray['used_for'] = $uses;
    xml_insert($record->record, create_record($recordArray, $termType));
    return $record;
}
開發者ID:nibble-arts,項目名稱:openthesaurus,代碼行數:23,代碼來源:adlib.php

示例3: hyrarchic_links

 function hyrarchic_links($id)
 {
     $tempArray = thesaurus::get_parent($id);
     if ($tempArray) {
         echo "<form method='get' action='index.php' name='ob'>";
         echo "<fieldset>";
         echo "<legend>Oberbegriffe</legend>";
         $x = 0;
         $listArray = array();
         foreach ($tempArray as $entry) {
             $listArray[$x++] = thesaurus::get_descriptor($entry);
         }
         echo_selection($listArray, "id", "", 3, "upper-field");
         // display action line
         action::display($id, 1);
         echo "</fieldset>";
         echo "</form>";
     }
 }
開發者ID:nibble-arts,項目名稱:openthesaurus,代碼行數:19,代碼來源:form.php


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