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


PHP Tree::get方法代碼示例

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


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

示例1: _tree

 private function _tree($upid = 0, $force = 0, $addn = ' ')
 {
     $and = $force == 1 ? " and upid='{$upid}' " : "";
     $list = Lua::get_more("select * from lua_category where systemname='" . SYSNAME . "' {$and} order by vieworder asc,id desc");
     $back = array();
     if ($list) {
         foreach ($list as $v) {
             $out[$v['id']] = $v;
         }
         $tree = new Tree($out);
         $tree->field = 'name';
         $back = $tree->get($upid, 0, $addn);
     }
     return $back;
 }
開發者ID:lianren,項目名稱:doophp.cms,代碼行數:15,代碼來源:__category.php

示例2: _tree

 private function _tree($lua = 'category', $perm)
 {
     $lua = $lua ? $lua : 'category';
     $list = Lua::get_more("select * from lua_" . $lua . " where systemname='" . $perm . "' order by vieworder asc,id desc");
     $back = array();
     if ($list) {
         foreach ($list as $v) {
             $out[$v['id']] = $v;
         }
         $tree = new Tree($out);
         $tree->field = 'name';
         $back = $tree->get(0, 0, ' ');
     }
     return $back;
 }
開發者ID:lianren,項目名稱:doophp.cms,代碼行數:15,代碼來源:__admin.php

示例3: _tree

 private function _tree($id)
 {
     $list = Lua::get_more("select * from lua_model_table where model_id='{$id}'");
     $back = array();
     if ($list) {
         foreach ($list as $v) {
             $out[$v['id']] = $v;
         }
         $tree = new Tree($out);
         $back = $tree->get(0, 0, ' ');
     }
     return $back;
 }
開發者ID:lianren,項目名稱:doophp.cms,代碼行數:13,代碼來源:__model.php

示例4: testDataEntry

 function testDataEntry()
 {
     $t1 = new Tree();
     $t1->set("/master/test", "xyz");
     $this->assertEqual($t1->get("/master/test"), "xyz", "Il valore di /master/test non e' xyz!!");
     $t1->merge("/master/first_test", array("first" => "my_first_value"));
     $t1->merge("/master/second_test", array("second" => "my_second_value"));
     $this->assertEqual($t1->get("/master/first_test/first"), "my_first_value", "Il valore di test non corrisponde!!");
     $this->assertEqual($t1->get("/master/second_test/second"), "my_second_value", "Il valore di test non corrisponde!!");
 }
開發者ID:mbcraft,項目名稱:frozen,代碼行數:10,代碼來源:tree_test.php


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