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


PHP Generic::get方法代码示例

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


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

示例1: while

            }
        }
        if ($result = $this->db->query($queryMat)) {
            while ($row = $result->fetch_assoc()) {
                $dataMat[] = $row;
            }
        }
        return array('geometry' => $dataGeometry, 'loading' => $dataLoading, 'support' => $dataSpt, 'material' => $dataMat);
    }
}
$get = (object) $_GET;
$request = (object) $_REQUEST;
$post = json_decode(file_get_contents("php://input"));
@($database = !empty($request->database) ? $request->database : $post->database);
$generic = new Generic($database);
$data = $generic->get(104, 'true');
// $data = $generic->get($request->userid, $request->clear);
// die(json_encode($data));
// var_dump($data);
// var_dump($data['geometry']);
$nodes_g = array();
for ($i = 0; $i < sizeof($data['geometry']); $i++) {
    if ($i == 0) {
        array_push($nodes_g, $data['geometry'][$i]['start']);
        array_push($nodes_g, $data['geometry'][$i]['end']);
    } else {
        array_push($nodes_g, $data['geometry'][$i]['end']);
    }
}
print_r($nodes_g);
var_dump($data['loading']);
开发者ID:lightbringer1991,项目名称:Projects,代码行数:31,代码来源:BA_FEA.php

示例2: placeInExpanded

 private static function placeInExpanded($data, array &$nodes, array $expansion_data, $name_property = 'name', $children_property = 'children', $output_type = 'keep_type')
 {
     $keys = array_keys($expansion_data);
     $column = $keys[0];
     $data_to_store = array_shift($expansion_data);
     $found_node = null;
     foreach ($nodes as $node) {
         if (Generic::get($node, $name_property) == Generic::get($data, $column)) {
             $found_node = $node;
         }
     }
     if ($found_node == null) {
         $found_node = array();
         $found_node[$name_property] = Generic::get($data, $column);
         foreach ($data_to_store as $col) {
             $found_node[$col] = Generic::get($data, $col);
         }
         if (count($expansion_data)) {
             $found_node[$children_property] = array();
         }
         if ($output_type == 'object') {
             $found_node = (object) $found_node;
         }
         $nodes[] = $found_node;
     }
     if (count($expansion_data)) {
         Arrays::placeInExpanded($data, Generic::get($found_node, $children_property), $expansion_data, $name_property, $children_property, $output_type);
     }
 }
开发者ID:Nozemi,项目名称:MyFramework,代码行数:29,代码来源:Arrays.class.php


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