/
home
/
techb158
/
immovalet.com
/
vendor
/
botble
/
revision
/
src
/
/home/techb158/immovalet.com/vendor/botble/revision/src
mkdir
upload
Name
Size
Mode
Actions
Providers/
-
0755
rm
FieldFormatter.php
814
0644
edit
dl
rm
Revision.php
7370
0644
edit
dl
rm
RevisionableTrait.php
13268
0644
edit
dl
rm
Edit:
/home/techb158/immovalet.com/vendor/botble/revision/src/FieldFormatter.php
(814B)
<?php namespace Botble\Revision; class FieldFormatter { /** * Format the value according to the provided formats. * * @param string $key * @param string $value * @param array $formats * @return string formatted value */ public static function format($key, $value, array $formats) { foreach ($formats as $pkey => $format) { $parts = explode(':', $format); if (count($parts) === 1) { continue; } if ($pkey == $key) { $method = array_shift($parts); if (method_exists(get_class(), $method)) { return self::$method($value, implode(':', $parts)); } break; } } return $value; } }
Save
$format) { $parts = explode(':', $format); if (count($parts) === 1) { continue; } if ($pkey == $key) { $method = array_shift($parts); if (method_exists(get_class(), $method)) { return self::$method($value, implode(':', $parts)); } break; } } return $value; } }