当前位置: 首页>>代码示例>>PHP>>正文


PHP tree::select方法代码示例

本文整理汇总了PHP中tree::select方法的典型用法代码示例。如果您正苦于以下问题:PHP tree::select方法的具体用法?PHP tree::select怎么用?PHP tree::select使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在tree的用法示例。


在下文中一共展示了tree::select方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: tree

 public function tree()
 {
     $git = new Git();
     $repositories = new repositories($this->getDb());
     $tree = new tree($this->getDb());
     //$tree_data=$tree->delete();
     //$repo_name = 'gitosis-admin';
     $all_repos = $repositories->select('*');
     //$repo_tree = $git->git_tree($repo_name);
     //$repo_tree = $git->git_tree();
     /*foreach($repo_tree as $repo_tree_term)
     		{
     		        
     			$tree->insert($repo_tree_term);
     		}*/
     foreach ($all_repos as $repo) {
         display($repo);
         $repo_name = isset($repo['name']) ? $repo['name'] : false;
         if ($repo_name) {
             $repo_trees = $git->git_tree($repo_name);
             display($repo_trees);
             if (count($repo_trees) > 0) {
                 foreach ($repo_trees as $tree_term) {
                     if (isset($tree_term['repo']) && isset($tree_term['commit']) && $tree_term['repo'] != '' && $tree_term['commit'] != '') {
                         $old_data = $tree->select('*', 'WHERE repo="' . $tree_term['repo'] . '" AND commit="' . $tree_term['commit'] . '"');
                         if (!isset($old_data[0]['id'])) {
                             $tree->insert($tree_term);
                         }
                     }
                 }
             }
         }
     }
 }
开发者ID:prince-mishra,项目名称:icode,代码行数:34,代码来源:cronController.php


注:本文中的tree::select方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。