parent::__construct(__CLASS__);
// Init array
- $this->subNodes = array(
+ $this->setSubNodes(array(
'announcement-data',
'listener',
self::ANNOUNCEMENT_DATA_NODE_STATUS,
self::ANNOUNCEMENT_DATA_EXTERNAL_ADDRESS,
self::ANNOUNCEMENT_DATA_INTERNAL_ADDRESS,
'object-type-list',
- );
+ ));
}
/**
parent::__construct(__CLASS__);
// Init sub-nodes array
- $this->subNodes = array(
+ $this->setSubNodes(array(
// These nodes don't contain any data
'my-data',
'your-data',
'your-session-id',
// Answer status (generic field)
self::ANSWER_STATUS,
- );
+ ));
}
/**
parent::__construct(__CLASS__);
// Init sub-nodes array
- $this->subNodes = array(
+ $this->setSubNodes(array(
// These nodes don't contain any data
'my-data',
'your-data',
self::ANSWER_STATUS,
// DHT node list
self::DHT_BOOTSTRAP_DATA_NODE_LIST,
- );
+ ));
}
/**
parent::__construct(__CLASS__);
// Init sub-nodes array
- $this->subNodes = array(
+ $this->setSubNodes(array(
self::REQUEST_DATA_SESSION_ID,
self::REQUEST_DATA_NODE_LIST,
// Answer status (generic field)
self::ANSWER_STATUS,
- );
+ ));
}
/**
/**
* Main nodes in the XML tree
*/
- protected $mainNodes = array();
+ private $mainNodes = array();
/**
* Sub nodes in the XML tree
*/
- protected $subNodes = array();
+ private $subNodes = array();
/**
* Current main node
*/
- protected $curr = array();
+ private $curr = array();
/**
* XML template type
return $this->stackerName;
}
+ /**
+ * Setter for sub node array
+ *
+ * @param $subNodes Array with valid sub node names
+ * @return void
+ */
+ public final function setSubNodes (array $subNodes) {
+ $this->subNodes = $subNodes;
+ }
+
/**
* Getter for sub node array
*
parent::__construct(__CLASS__);
// Init array
- $this->subNodes = array(
+ $this->setSubNodes(array(
'self-connect-data',
self::SELF_CONNECT_DATA_NODE_ID,
self::SELF_CONNECT_DATA_SESSION_ID
- );
+ ));
}
/**
parent::__construct(__CLASS__);
// Init array
- $this->subNodes = array(
+ $this->setSubNodes(array(
self::DHT_BOOTSTRAP_DATA_BOOTSTRAP_DATA,
'listener',
self::DHT_BOOTSTRAP_DATA_NODE_STATUS,
self::DHT_BOOTSTRAP_DATA_SESSION_ID,
self::DHT_BOOTSTRAP_DATA_EXTERNAL_ADDRESS,
self::DHT_BOOTSTRAP_DATA_INTERNAL_ADDRESS
- );
+ ));
}
/**
$this->objectRegistryInstance = ObjectTypeRegistryFactory::createObjectTypeRegistryInstance();
// Init sub nodes
- $this->subNodes = array(
+ $this->setSubNodes(array(
'object-list',
'object-list-entry',
self::OBJECT_TYPE_DATA_NAME,
self::OBJECT_TYPE_DATA_MAX_SPREAD,
self::OBJECT_TYPE_DATA_PROTOCOL,
self::OBJECT_TYPE_DATA_RECIPIENT_TYPE
- );
+ ));
}
/**
parent::__construct(__CLASS__);
// Init sub nodes
- $this->subNodes = array(
+ $this->setSubNodes(array(
'meta-data',
'global-project-identifier',
'test-unit-created',
'cruncher-key',
'key-id',
'key-value'
- );
+ ));
}
/**
parent::__construct(__CLASS__);
// Init array
- $this->subNodes = array(
+ $this->setSubNodes(array(
'publish-data',
'listener',
self::PUBLISH_DATA_NODE_STATUS,
self::PUBLISH_DATA_SESSION_ID,
self::PUBLISH_DATA_EXTERNAL_ADDRESS,
'object-type-list',
- );
+ ));
}
/**
parent::__construct(__CLASS__);
// Init sub nodes
- $this->subNodes = array(
+ $this->setSubNodes(array(
self::REQUEST_DATA_ACCEPTED_OBJECT_TYPES,
self::REQUEST_DATA_SESSION_ID,
- );
+ ));
}
/**