X7ROOT File Manager
Current Path:
/home/gfecatvj/sites/restate/vendor/botble/revision/src
home
/
gfecatvj
/
sites
/
restate
/
vendor
/
botble
/
revision
/
src
/
📁
..
📄
FieldFormatter.php
(813 B)
📁
Providers
📄
Revision.php
(7.2 KB)
📄
RevisionableTrait.php
(12.82 KB)
Editing: FieldFormatter.php
<?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; } }
Upload File
Create Folder