Add ISafeFormatAvatar
authorTim Düsterhus <duesterhus@woltlab.com>
Wed, 17 Feb 2021 14:49:05 +0000 (15:49 +0100)
committerTim Düsterhus <duesterhus@woltlab.com>
Thu, 18 Feb 2021 11:41:15 +0000 (12:41 +0100)
wcfsetup/install/files/lib/data/user/avatar/ISafeFormatAvatar.class.php [new file with mode: 0644]

diff --git a/wcfsetup/install/files/lib/data/user/avatar/ISafeFormatAvatar.class.php b/wcfsetup/install/files/lib/data/user/avatar/ISafeFormatAvatar.class.php
new file mode 100644 (file)
index 0000000..a909ad3
--- /dev/null
@@ -0,0 +1,24 @@
+<?php
+
+namespace wcf\data\user\avatar;
+
+/**
+ * A safe avatar supports a broadly supported fallback image format.
+ *
+ * @author  Tim Duesterhus
+ * @copyright   2001-2021 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package WoltLabSuite\Core\Data\User\Avatar
+ */
+interface ISafeFormatAvatar extends IUserAvatar
+{
+    /**
+     * @see IUserAvatar::getURL()
+     */
+    public function getSafeURL(?int $size = null): string;
+
+    /**
+     * @see IUserAvatar::getImageTag()
+     */
+    public function getSafeImageTag(?int $size = null): string;
+}