LogModel::formatDiff PHP Method

formatDiff() public method

Format a diff of an edit.
public formatDiff ( string $Old, string $New, string $Method = 'html' ) : string | array
$Old string The record before the edit.
$New string The record after the edit.
$Method string Either **normal**, **html**, or **mixed**.
return string | array Returns the diff formatted according to {@link $Method}.
    public function formatDiff($Old, $New, $Method = 'html')
    {
        static $TinyDiff = null;
        if ($TinyDiff === null) {
            require_once dirname(__FILE__) . '/tiny_diff.php';
            $TinyDiff = new Tiny_diff();
        }
        $Result = $TinyDiff->compare($Old, $New, $Method);
        return $Result;
    }