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


PHP Util::asWKT方法代码示例

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


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

示例1: _getDataCellForGeometryColumns

 /**
  * Get data cell for geometry type fields
  *
  * @param string        $column                the relevant column in data row
  * @param string        $class                 the html class for column
  * @param object        $meta                  the meta-information about
  *                                             this field
  * @param array         $map                   the list of relations
  * @param array         $_url_params           the parameters for generate url
  * @param boolean       $condition_field       the column should highlighted
  *                                             or not
  * @param object|string $transformation_plugin the name of transformation
  *                                             function
  * @param string        $default_function      the default transformation
  *                                             function
  * @param string        $transform_options     the transformation parameters
  * @param array         $analyzed_sql_results  the analyzed query
  *
  * @return  string  $cell                  the prepared data cell, html content
  *
  * @access  private
  *
  * @see     _getTableBody()
  */
 private function _getDataCellForGeometryColumns($column, $class, $meta, $map, $_url_params, $condition_field, $transformation_plugin, $default_function, $transform_options, $analyzed_sql_results)
 {
     if (!isset($column) || is_null($column)) {
         $cell = $this->_buildNullDisplay($class, $condition_field, $meta);
         return $cell;
     }
     if ($column == '') {
         $cell = $this->_buildEmptyDisplay($class, $condition_field, $meta);
         return $cell;
     }
     // Display as [GEOMETRY - (size)]
     if ($_SESSION['tmpval']['geoOption'] == self::GEOMETRY_DISP_GEOM) {
         $geometry_text = $this->_handleNonPrintableContents(strtoupper(self::GEOMETRY_FIELD), $column, $transformation_plugin, $transform_options, $default_function, $meta, $_url_params);
         $cell = $this->_buildValueDisplay($class, $condition_field, $geometry_text);
         return $cell;
     }
     if ($_SESSION['tmpval']['geoOption'] == self::GEOMETRY_DISP_WKT) {
         // Prepare in Well Known Text(WKT) format.
         $where_comparison = ' = ' . $column;
         // Convert to WKT format
         $wktval = Util::asWKT($column);
         list($is_field_truncated, $wktval, ) = $this->_getPartialText($wktval);
         $cell = $this->_getRowData($class, $condition_field, $analyzed_sql_results, $meta, $map, $wktval, $transformation_plugin, $default_function, '', $where_comparison, $transform_options, $is_field_truncated, '');
         return $cell;
     }
     // Prepare in  Well Known Binary (WKB) format.
     if ($_SESSION['tmpval']['display_binary']) {
         $where_comparison = ' = ' . $column;
         $wkbval = substr(bin2hex($column), 8);
         list($is_field_truncated, $wkbval, ) = $this->_getPartialText($wkbval);
         $cell = $this->_getRowData($class, $condition_field, $analyzed_sql_results, $meta, $map, $wkbval, $transformation_plugin, $default_function, '', $where_comparison, $transform_options, $is_field_truncated, '');
         return $cell;
     }
     $wkbval = $this->_handleNonPrintableContents(self::BINARY_FIELD, $column, $transformation_plugin, $transform_options, $default_function, $meta, $_url_params);
     $cell = $this->_buildValueDisplay($class, $condition_field, $wkbval);
     return $cell;
 }
开发者ID:rugbyprof,项目名称:phpmyadmin,代码行数:61,代码来源:DisplayResults.php


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