本文整理汇总了PHP中MapasCulturais\App::txts方法的典型用法代码示例。如果您正苦于以下问题:PHP App::txts方法的具体用法?PHP App::txts怎么用?PHP App::txts使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MapasCulturais\App
的用法示例。
在下文中一共展示了App::txts方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _outputArray
protected function _outputArray(array $data, $singular_object_name = 'Entity', $plural_object_name = 'Entities')
{
$uriExplode = explode('/', $_SERVER['REQUEST_URI']);
if ($data && key_exists(2, $uriExplode)) {
$singular_object_name = mb_convert_encoding($this->translate[$uriExplode[2]], "HTML-ENTITIES", "UTF-8");
$plural_object_name = $singular_object_name . 's';
}
?>
<!DOCTYPE html>
<html>
<head>
<title><?php
echo sprintf(App::txts("%s {$singular_object_name} encontrado.", "%s {$plural_object_name} encontrados.", count($data)), count($data));
?>
</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
table table th {text-align: left; white-space: nowrap; }
</style>
</head>
<body>
<h1><?php
echo sprintf(App::txts("%s {$singular_object_name} encontrado.", "%s {$plural_object_name} encontrados.", count($data)), count($data));
?>
</h1>
<?php
$this->printTable($data);
?>
</body>
</html>
<?php
}
示例2: _outputArray
protected function _outputArray(array $data, $singular_object_name = 'Entity', $plural_object_name = 'Entities')
{
if (!key_exists('type', $data[0])) {
die('@select entity type property is mandatory. Aborting');
}
$singular_object_name = $this->translate[$data[0]['type']->entity_class];
$plural_object_name = $singular_object_name . 's';
?>
<!DOCTYPE html>
<html>
<head>
<title><?php
echo sprintf(App::txts("%s {$singular_object_name} encontrado.", "%s {$plural_object_name} encontrados.", count($data)), count($data));
?>
</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
table table th {text-align: left; white-space: nowrap; }
</style>
</head>
<body>
<h1><?php
echo sprintf(App::txts("%s {$singular_object_name} encontrado.", "%s {$plural_object_name} encontrados.", count($data)), count($data));
?>
</h1>
<?php
$this->printTable($data);
?>
</body>
</html>
<?php
}