From 5a4e677b827623649c6d14362f883642302958d8 Mon Sep 17 00:00:00 2001 From: Oliver Vogel Date: Sun, 16 Jan 2022 18:13:56 +0100 Subject: [PATCH] Added EncodedImage::toString() --- src/EncodedImage.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/EncodedImage.php b/src/EncodedImage.php index 011c6f15..a0461d84 100644 --- a/src/EncodedImage.php +++ b/src/EncodedImage.php @@ -33,8 +33,13 @@ class EncodedImage return sprintf('data:%s;base64,%s', $this->mimetype, base64_encode($this->data)); } - public function __toString(): string + public function toString(): string { return $this->data; } + + public function __toString(): string + { + return $this->toString(); + } }