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


PHP Table::getUiProp方法代码示例

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


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

示例1: PMA_handleSortOrder

/**
 * Handle remembered sorting order, only for single table query
 *
 * @param string $db                    database name
 * @param string $table                 table name
 * @param array  &$analyzed_sql_results the analyzed query results
 * @param string &$full_sql_query       SQL query
 *
 * @return void
 */
function PMA_handleSortOrder($db, $table, &$analyzed_sql_results, &$full_sql_query)
{
    $pmatable = new Table($table, $db);
    if (empty($analyzed_sql_results['order'])) {
        // Retrieving the name of the column we should sort after.
        $sortCol = $pmatable->getUiProp(Table::PROP_SORTED_COLUMN);
        if (empty($sortCol)) {
            return;
        }
        // Remove the name of the table from the retrieved field name.
        $sortCol = str_replace(PMA\libraries\Util::backquote($table) . '.', '', $sortCol);
        // Create the new query.
        $full_sql_query = SqlParser\Utils\Query::replaceClause($analyzed_sql_results['statement'], $analyzed_sql_results['parser']->list, 'ORDER BY ' . $sortCol);
        // TODO: Avoid reparsing the query.
        $analyzed_sql_results = SqlParser\Utils\Query::getAll($full_sql_query);
    } else {
        // Store the remembered table into session.
        $pmatable->setUiProp(Table::PROP_SORTED_COLUMN, SqlParser\Utils\Query::getClause($analyzed_sql_results['statement'], $analyzed_sql_results['parser']->list, 'ORDER BY'));
    }
}
开发者ID:Devuiux,项目名称:phpmyadmin,代码行数:30,代码来源:sql.lib.php

示例2: _getColumnParams

 /**
  * Get column order and column visibility
  *
  * @param array $analyzed_sql_results analyzed sql results
  *
  * @return  array           2 element array - $col_order, $col_visib
  *
  * @access  private
  *
  * @see     _getTableBody()
  */
 private function _getColumnParams($analyzed_sql_results)
 {
     if ($this->_isSelect($analyzed_sql_results)) {
         $pmatable = new Table($this->__get('table'), $this->__get('db'));
         $col_order = $pmatable->getUiProp(Table::PROP_COLUMN_ORDER);
         $col_visib = $pmatable->getUiProp(Table::PROP_COLUMN_VISIB);
     } else {
         $col_order = false;
         $col_visib = false;
     }
     return array($col_order, $col_visib);
 }
开发者ID:rugbyprof,项目名称:phpmyadmin,代码行数:23,代码来源:DisplayResults.php

示例3: testSetUiProp

 /**
  * Test for setUiProp
  *
  * @return void
  */
 public function testSetUiProp()
 {
     $table_name = 'PMA_BookMark';
     $db = 'PMA';
     $table = new Table($table_name, $db);
     $property = Table::PROP_COLUMN_ORDER;
     $value = "UiProp_value";
     $table_create_time = null;
     $table->setUiProp($property, $value, $table_create_time);
     //set UI prop successfully
     $this->assertEquals($value, $table->uiprefs[$property]);
     //removeUiProp
     $table->removeUiProp($property);
     $is_define_property = isset($table->uiprefs[$property]) ? true : false;
     $this->assertEquals(false, $is_define_property);
     //getUiProp after removeUiProp
     $is_define_property = $table->getUiProp($property);
     $this->assertEquals(false, $is_define_property);
 }
开发者ID:pboutin44,项目名称:maintest,代码行数:24,代码来源:TableTest.php


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