本文整理汇总了PHP中PMA\Util\get函数的典型用法代码示例。如果您正苦于以下问题:PHP get函数的具体用法?PHP get怎么用?PHP get使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getCachedTableContent
/**
* Get a cached value from table cache.
*
* @param string $contentPath Dot notation of the target value
* @param mixed $default Return value on cache miss
*
* @return mixed cached value or default
*/
public function getCachedTableContent($contentPath, $default = null)
{
return Util\get($this->_table_cache, $contentPath, $default);
}
示例2: array
if (isset($columnMeta['Field'])) {
$form_params['field_orig[' . $columnNumber . ']'] = $columnMeta['Field'];
if (isset($columnMeta['column_status']) && !$columnMeta['column_status']['isEditable']) {
$form_params['field_name[' . $columnNumber . ']'] = $columnMeta['Field'];
}
} else {
$form_params['field_orig[' . $columnNumber . ']'] = '';
}
// old column type
if (isset($columnMeta['Type'])) {
// keep in uppercase because the new type will be in uppercase
$form_params['field_type_orig[' . $columnNumber . ']'] = mb_strtoupper($type);
if (isset($columnMeta['column_status']) && !$columnMeta['column_status']['isEditable']) {
$form_params['field_type[' . $columnNumber . ']'] = mb_strtoupper($type);
}
} else {
$form_params['field_type_orig[' . $columnNumber . ']'] = '';
}
// old column length
$form_params['field_length_orig[' . $columnNumber . ']'] = $length;
// old column default
$form_params = array_merge($form_params, array("field_default_value_orig[{$columnNumber}]" => Util\get($columnMeta, 'Default', ''), "field_default_type_orig[{$columnNumber}]" => Util\get($columnMeta, 'DefaultType', ''), "field_collation_orig[{$columnNumber}]" => Util\get($columnMeta, 'Collation', ''), "field_attribute_orig[{$columnNumber}]" => trim(Util\get($extracted_columnspec, 'attribute', '')), "field_null_orig[{$columnNumber}]" => Util\get($columnMeta, 'Null', ''), "field_extra_orig[{$columnNumber}]" => Util\get($columnMeta, 'Extra', ''), "field_comments_orig[{$columnNumber}]" => Util\get($columnMeta, 'Comment', '')));
}
$content_cells[$columnNumber] = array('columnNumber' => $columnNumber, 'columnMeta' => $columnMeta, 'type_upper' => mb_strtoupper($type), 'length_values_input_size' => $length_values_input_size, 'length' => $length, 'extracted_columnspec' => $extracted_columnspec, 'submit_attribute' => $submit_attribute, 'comments_map' => $comments_map, 'fields_meta' => isset($fields_meta) ? $fields_meta : null, 'is_backup' => $is_backup, 'move_columns' => $move_columns, 'cfgRelation' => $cfgRelation, 'available_mime' => $available_mime, 'mime_map' => isset($mime_map) ? $mime_map : array());
}
// end for
$html = PMA\Template::get('columns_definitions/column_definitions_form')->render(array('is_backup' => $is_backup, 'fields_meta' => isset($fields_meta) ? $fields_meta : null, 'mimework' => $cfgRelation['mimework'], 'action' => $action, 'form_params' => $form_params, 'content_cells' => $content_cells));
unset($form_params);
$response = PMA_Response::getInstance();
$response->getHeader()->getScripts()->addFiles(array('jquery/jquery.uitablefilter.js', 'indexes.js'));
$response->addHTML($html);
示例3: adjustColumnPrivileges
/**
* Adjusts the Privileges for all the columns whose names have changed
*
* @param array $adjust_privileges assoc array of old col names mapped to new
* cols
*
* @return boolean $changed boolean whether at least one column privileges
* adjusted
*/
protected function adjustColumnPrivileges($adjust_privileges)
{
$changed = false;
if ((!defined('PMA_DRIZZLE') || !PMA_DRIZZLE) && Util\get($GLOBALS, 'col_priv', false) && Util\get($GLOBALS, 'flush_priv', false)) {
$this->dbi->selectDb('mysql');
// For Column specific privileges
foreach ($adjust_privileges as $oldCol => $newCol) {
$this->dbi->query(sprintf('UPDATE %s SET Column_name = "%s"
WHERE Db = "%s"
AND Table_name = "%s"
AND Column_name = "%s";', PMA_Util::backquote('columns_priv'), $newCol, $this->db, $this->table, $oldCol));
// i.e. if atleast one column privileges adjusted
$changed = true;
}
if ($changed) {
// Finally FLUSH the new privileges
$this->dbi->query("FLUSH PRIVILEGES;");
}
}
return $changed;
}