]> git.mxchange.org Git - shipsimu.git/blobdiff - inc/classes/main/factories/class_BaseFactory.php
Fixes for template engine
[shipsimu.git] / inc / classes / main / factories / class_BaseFactory.php
index 11c8ec960649c541d8d78cd127a4f13cf0994ff2..1ba8f84d227e0acd39b0e66c19b270c164129513 100644 (file)
  */
 class BaseFactory extends BaseFrameworkSystem {
        /**
-        * Private constructor
+        * An instance of the real factory class
+        */
+       private $realFactoryInstance = null;
+
+       /**
+        * Protected constructor
         *
-        * @param       $class  Name of the real class (not BaseFactory)
+        * @param       $className      Name of the real class (not BaseFactory)
         * @return      void
         */
-       protected function __construct ($class) {
+       protected function __construct ($className) {
                // Call parent constructor
-               parent::__construct($class);
+               parent::__construct($className);
 
                // Clean up a little
                $this->removeNumberFormaters();
                $this->removeSystemArray();
        }
+
+       /**
+        * Setter for the *real* factory instance
+        *
+        * @param       $realFactoryInstance    An instance of the real factory class
+        * @return      void
+        */
+       public final function setRealFactoryInstance (BaseFrameworkSystem $realFactoryInstance) {
+               $this->realFactoryInstance = $realFactoryInstance;
+       }
+
+       /**
+        * Getter for the *real* factory instance
+        *
+        * @return      $realFactoryInstance    An instance of the real factory class
+        */
+       protected final function getRealFactoryInstance () {
+               return $this->realFactoryInstance;
+       }
 }
 
 // [EOF]