diff --git a/library/Businessprocess/BusinessProcess.php b/library/Businessprocess/BusinessProcess.php index f123cdf..7b88b21 100644 --- a/library/Businessprocess/BusinessProcess.php +++ b/library/Businessprocess/BusinessProcess.php @@ -191,6 +191,26 @@ class BusinessProcess return array_key_exists($name, $this->nodes); } + public function createService($host, $service) + { + $node = new ServiceNode( + $this, + (object) array( + 'hostname' => $host, + 'service' => $service + ) + ); + $this->nodes[$host . ';' . $service] = $node; + return $node; + } + + public function createHost($host) + { + $node = new HostNode($this, (object) array('hostname' => $host)); + $this->nodes[$host . ';Hoststatus'] = $node; + return $node; + } + public function getNode($name) { if (array_key_exists($name, $this->nodes)) { @@ -221,6 +241,12 @@ class BusinessProcess ); } + public function addObjectName($name) + { + $this->all_checks[$name] = 1; + return $this; + } + public function addNode($name, Node $node) { if (array_key_exists($name, $this->nodes)) {