From 6ff588cf06af2cb7e7d8b49d642f79da58896ea1 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Sun, 24 Feb 2019 14:26:55 +0100 Subject: [PATCH] Add getters (and one setter) to AttachmentHandler class See #2852 --- .../attachment/AttachmentHandler.class.php | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/wcfsetup/install/files/lib/system/attachment/AttachmentHandler.class.php b/wcfsetup/install/files/lib/system/attachment/AttachmentHandler.class.php index 8f96b35007..bbf1007e3e 100644 --- a/wcfsetup/install/files/lib/system/attachment/AttachmentHandler.class.php +++ b/wcfsetup/install/files/lib/system/attachment/AttachmentHandler.class.php @@ -235,4 +235,56 @@ class AttachmentHandler implements \Countable { public function getProcessor() { return $this->processor; } + + /** + * Returns the temporary hashes used to identify the relevant uploaded attachments. + * + * @return string[] + * @since 5.2 + */ + public function getTmpHashes() { + return $this->tmpHash; + } + + /** + * Sets the temporary hashes used to identify the relevant uploaded attachments. + * + * @param string[] $tmpHash + * @since 5.2 + */ + public function setTmpHashes(array $tmpHash) { + $this->tmpHash = $tmpHash; + } + + /** + * Returns the attachment object type + * + * @return ObjectType + * @since 5.2 + */ + public function getObjectType() { + return $this->objectType; + } + + /** + * Returns the id of the object the handled attachments belong to. If the object does not + * exist (yet), `0` is returned. + * + * @return integer + * @since 5.2 + */ + public function getObjectID() { + return $this->objectID; + } + + /** + * Returns the id of the parent object of the object the handled attachments belong to. + * If no such parent object exists, `0` is returned. + * + * @return integer + * @since 5.2 + */ + public function getParentObjectID() { + return $this->parentObjectID; + } } -- 2.20.1