*/
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]