]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/producer/class_BaseProducer.php
Added more classes (source for anything 'sourced', etc):
[hub.git] / application / hub / main / producer / class_BaseProducer.php
index 2b20adeea3e121ea4fbc2a034d7f458fc9dacdce..81c21284a219fd63261fb1ff30445e8f01566d06 100644 (file)
@@ -27,6 +27,11 @@ abstract class BaseProducer extends BaseFrameworkSystem {
         */
        private $outgoingQueueInstance = null;
 
+       /**
+        * Every procuded item/unit/etc. usually have a source
+        */
+       private $sourceInstance = null;
+
        /**
         * Protected constructor
         *
@@ -45,7 +50,7 @@ abstract class BaseProducer extends BaseFrameworkSystem {
        }
 
        /**
-        * Setter for out-going work queue 
+        * Setter for out-going work queue
         *
         * @param       $outgoingQueueInstance  The out-going work queue instance
         * @return      void
@@ -55,7 +60,7 @@ abstract class BaseProducer extends BaseFrameworkSystem {
        }
 
        /**
-        * Getter for out-going work queue 
+        * Getter for out-going work queue
         *
         * @param       $outgoingQueueInstance  The out-going work queue instance
         */
@@ -63,6 +68,25 @@ abstract class BaseProducer extends BaseFrameworkSystem {
                return $this->outgoingQueueInstance;
        }
 
+       /**
+        * Setter for a Sourceable instance
+        *
+        * @param       $sourceInstance The Sourceable instance
+        * @return      void
+        */
+       protected function setSourceInstance (Sourceable $sourceInstance) {
+               $this->sourceInstance = $sourceInstance;
+       }
+
+       /**
+        * Getter for a Sourceable instance
+        *
+        * @param       $sourceInstance The Sourceable instance
+        */
+       protected function getSourceInstance () {
+               return $this->sourceInstance;
+       }
+
        /**
         * Initializes this producer, this method must be overwritten.
         *