36 lines
688 B
PHP
36 lines
688 B
PHP
<?php
|
|
|
|
namespace App\Services\TomTool;
|
|
use App\Utils\Tools;
|
|
|
|
class TgFormat {
|
|
|
|
|
|
//case 11#gb
|
|
public static function ValueType($sValue)
|
|
{
|
|
list($sValue, $sValueType) = explode("#", $sValue);
|
|
|
|
if ($sValueType) {
|
|
if ($sValueType == "gb") {
|
|
$sValue = Tools::tomGbToB($sValue);
|
|
} else if ($sValueType == "date") {
|
|
$sValue = strtotime($sValue);
|
|
}
|
|
}
|
|
|
|
return $sValue;
|
|
}
|
|
|
|
public static function arrToStr($arr)
|
|
{
|
|
$str = "";
|
|
foreach ($arr as $v) {
|
|
$str .= "\n\n".$v;
|
|
}
|
|
|
|
return $str;
|
|
}
|
|
|
|
}
|