*/
private $databaseInstance = null;
+ /**
+ * A helper instance for the form
+ */
+ private $helperInstance = null;
+
+ /**
+ * An instance of a source
+ */
+ private $sourceInstance = null;
+
/**
* The real class name
*/
* @return void
*/
public final function __set ($name, $value) {
- $this->debugOutput(sprintf("Tried to set a missing field. name=%s, value[%s]=%s",
+ $this->debugBackTrace(sprintf("Tried to set a missing field. name=%s, value[%s]=%s",
$name,
gettype($value),
$value
* @return void
*/
public final function __get ($name) {
- $this->debugOutput(sprintf("Tried to get a missing field. name=%s",
+ $this->debugBackTrace(sprintf("Tried to get a missing field. name=%s",
+ $name
+ ));
+ }
+
+ /**
+ * Magic function to catch unsetting of missing fields/attributes
+ *
+ * @param $name Name of the field/attribute
+ * @return void
+ */
+ public final function __unset ($name) {
+ $this->debugBackTrace(sprintf("Tried to unset a missing field. name=%s",
$name
));
}
/**
* Outputs a debug backtrace and stops further script execution
*
+ * @param $message An optional message to output
* @return void
*/
- public function debugBackTrace () {
+ public function debugBackTrace ($message = '') {
// Sorry, there is no other way getting this nice backtrace
+ if (!empty($message)) {
+ // Output message
+ printf("Message: %s<br />\n", $message);
+ } // END - if
+
print("<pre>\n");
debug_print_backtrace();
print("</pre>");
return $this->socketResource;
}
+ /**
+ * Setter for helper instance
+ *
+ * @param $helperInstance An instance of a helper class
+ * @return void
+ */
+ protected final function setHelperInstance (Helper $helperInstance) {
+ $this->helperInstance = $helperInstance;
+ }
+
+ /**
+ * Getter for helper instance
+ *
+ * @return $helperInstance An instance of a helper class
+ */
+ public final function getHelperInstance () {
+ return $this->helperInstance;
+ }
+
+ /**
+ * Setter for a Sourceable instance
+ *
+ * @param $sourceInstance The Sourceable instance
+ * @return void
+ */
+ protected final function setSourceInstance (Sourceable $sourceInstance) {
+ $this->sourceInstance = $sourceInstance;
+ }
+
+ /**
+ * Getter for a Sourceable instance
+ *
+ * @param $sourceInstance The Sourceable instance
+ */
+ protected final function getSourceInstance () {
+ return $this->sourceInstance;
+ }
+
/**
* Setter for raw package Data
*