Add getters (and one setter) to AttachmentHandler class
authorMatthias Schmidt <gravatronics@live.com>
Sun, 24 Feb 2019 13:26:55 +0000 (14:26 +0100)
committerMatthias Schmidt <gravatronics@live.com>
Sun, 24 Feb 2019 13:26:55 +0000 (14:26 +0100)
See  #2852

wcfsetup/install/files/lib/system/attachment/AttachmentHandler.class.php

index 8f96b350078d9768621fd4f0bbfbdb95afd08500..bbf1007e3ebb73c1d0067e98ad7deb6d8d9a5526 100644 (file)
@@ -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;
+       }
 }