From: Matthias Schmidt Date: Sun, 24 Feb 2019 13:26:55 +0000 (+0100) Subject: Add getters (and one setter) to AttachmentHandler class X-Git-Tag: 5.2.0_Alpha_1~279 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6ff588cf06af2cb7e7d8b49d642f79da58896ea1;p=GitHub%2FWoltLab%2FWCF.git Add getters (and one setter) to AttachmentHandler class See #2852 --- 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; + } }