aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
authorCôme Chilliet <91878298+come-nc@users.noreply.github.com>2024-09-18 18:59:56 +0200
committerGitHub <noreply@github.com>2024-09-18 18:59:56 +0200
commit989d708bd896d69575bf662cc2bd0b870d187a7c (patch)
treea84d2b5c931f43c614ffaf43482f1da6bb4cfcf4 /lib/public
parent33928fc671b8ae80c809dcf2f0353c432776979d (diff)
parentb926df47303514b10211e6d1193a3d7310432ca9 (diff)
downloadnextcloud-server-989d708bd896d69575bf662cc2bd0b870d187a7c.tar.gz
nextcloud-server-989d708bd896d69575bf662cc2bd0b870d187a7c.zip
Merge pull request #48137 from nextcloud/enh/add-rich-object-formatter
feat: Add OCP interface to format richtext into string
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/RichObjectStrings/IRichTextFormatter.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/public/RichObjectStrings/IRichTextFormatter.php b/lib/public/RichObjectStrings/IRichTextFormatter.php
new file mode 100644
index 00000000000..1d72f480b07
--- /dev/null
+++ b/lib/public/RichObjectStrings/IRichTextFormatter.php
@@ -0,0 +1,25 @@
+<?php
+
+declare(strict_types=1);
+
+/**
+ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+
+namespace OCP\RichObjectStrings;
+
+/**
+ * Parse rich text and format it with the richobjects
+ *
+ * @since 31.0.0
+ */
+interface IRichTextFormatter {
+ /**
+ * @since 31.0.0
+ * @param string $message
+ * @param array<string,array<string,string>> $parameters
+ * @throws \InvalidArgumentException if a parameter has no name or no type
+ */
+ public function richToParsed(string $message, array $parameters): string;
+}