当前位置: 首页>>代码示例>>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;未经允许,请勿转载。