本文整理汇总了PHP中Collation::getDefinition方法的典型用法代码示例。如果您正苦于以下问题:PHP Collation::getDefinition方法的具体用法?PHP Collation::getDefinition怎么用?PHP Collation::getDefinition使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Collation
的用法示例。
在下文中一共展示了Collation::getDefinition方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testGetDefinition
/**
* Tests to get collation definition for different collations.
*/
public function testGetDefinition()
{
// Get definition for utf8_unicode_ci
$defCi = Collation::getDefinition('utf8_unicode_ci');
$defCs = Collation::getDefinition('utf8_unicode_cs');
$def = Collation::getDefinition('utf8_unicode');
// Check type
$this->assertType('string', $defCi);
$this->assertType('string', $defCs);
$this->assertType('string', $def);
// Check case sensitivity
$this->assertContains('(' . Yii::t('collation', 'ci') . ')', $defCi);
$this->assertContains('(' . Yii::t('collation', 'cs') . ')', $defCs);
$this->assertNotContains('(' . Yii::t('collation', 'ci') . ')', $def);
$this->assertNotContains('(' . Yii::t('collation', 'cs') . ')', $def);
}
示例2: function
';
var row = $('#' + idPrefix).closest("tr").prev();
row.attr('id', 'columns_<?php
echo $column->COLUMN_NAME;
?>
');
row.children('td:eq(1)').html('<?php
echo $column->COLUMN_NAME;
?>
');
row.children('td:eq(2)').html(<?php
echo CJSON::encode($column->COLUMN_TYPE);
?>
);
row.children('td:eq(3)').html('<?php
echo $column->COLLATION_NAME ? '<dfn class="collation" title="' . Collation::getDefinition($column->COLLATION_NAME) . '">' . $column->COLLATION_NAME . '</dfn>' : '';
?>
');
row.children('td:eq(4)').html('<?php
echo Yii::t('core', $column->isNullable ? 'yes' : 'no');
?>
');
row.children('td:eq(5)').html(<?php
echo !is_null($column->COLUMN_DEFAULT) ? CJSON::encode($column->COLUMN_DEFAULT) : ($column->isNullable ? CJSON::encode('<span class="null">NULL</span>') : '\'\'');
?>
);
row.children('td:eq(6)').html('<?php
echo $column->EXTRA;
?>
');
$('#' + idPrefix).parent().slideUp(500, function() {
示例3:
}
?>
</td>
<td>
<?php
echo $table->getRowCount();
?>
</td>
<td>
<?php
echo $table->ENGINE;
?>
</td>
<td>
<dfn title="<?php
echo Collation::getDefinition($table->TABLE_COLLATION);
?>
"><?php
echo $table->TABLE_COLLATION;
?>
</dfn>
</td>
<td style="text-align: right">
<?php
echo Formatter::fileSize($table->DATA_LENGTH + $table->INDEX_LENGTH);
?>
</td>
<td style="text-align: right">
<?php
echo Formatter::fileSize($table->DATA_FREE);
?>
示例4: strtolower
<td>
<?php
echo $column->COLUMN_NAME;
?>
</td>
<td>
<?php
echo $column->COLUMN_TYPE;
?>
</td>
<td>
<?php
if (!is_null($column->COLLATION_NAME)) {
?>
<dfn class="collation" title="<?php
echo Collation::getDefinition($column->COLLATION_NAME);
?>
">
<?php
echo $column->COLLATION_NAME;
?>
</dfn>
<?php
}
?>
</td>
<td>
<?php
echo Yii::t('core', strtolower($column->IS_NULLABLE));
?>
</td>
示例5: urlencode
?>
" />
</td>
<td>
<?php
echo CHtml::link(CHtml::encode($model->SCHEMA_NAME), Yii::app()->createUrl('schema/' . urlencode($model->SCHEMA_NAME)));
?>
</td>
<td class="count">
<?php
echo $model->tableCount;
?>
</td>
<td>
<dfn class="collation" title="<?php
echo Collation::getDefinition($model->DEFAULT_COLLATION_NAME);
?>
">
<?php
echo $model->DEFAULT_COLLATION_NAME;
?>
</dfn>
</td>
<td>
<?php
echo Html::icon('privileges', 16, true, 'core.privileges');
?>
</td>
<td>
<?php
if (Yii::app()->user->privileges->checkSchema($model->SCHEMA_NAME, 'ALTER')) {
示例6: foreach
echo $charset['Description'];
?>
</th>
</tr>
</thead>
<tbody>
<?php
foreach ($charset['collations'] as $collation) {
?>
<tr>
<td><?php
echo $collation['Collation'];
?>
</td>
<td><?php
echo Collation::getDefinition($collation['Collation'], false);
?>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
<?php
}
?>
<script type="text/javascript">
breadCrumb.set([