public format ( mixed $value, string | array $format ) : string | ||
$value | mixed | the value to be formatted. |
$format | string | array | the format of the value, e.g., "html", "text". To specify additional parameters of the formatting method, you may use an array. The first element of the array specifies the format name, while the rest of the elements will be used as the parameters to the formatting method. For example, a format of `['date', 'Y-m-d']` will cause the invocation of `asDate($value, 'Y-m-d')`. |
return | string | the formatting result. |