*/
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)
* @return void
// Call parent constructor
parent::__construct($class);
+ // Create unique ID number
+ $this->createUniqueID();
+
// 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]