$method(); if($val !== null) { $values[$fieldName] = array(); $values[$fieldName]['value'] = $val; $values[$fieldName]['source']['id'] = null; $values[$fieldName]['inherited'] = false; } } return $values; } public function setGlobalHostEventHandlerByName($command_name) { $c = new Criteria(); $c->add(NagiosCommandPeer::NAME); $c->setIgnoreCase(true); $command = NagiosCommandPeer::doSelectOne($c); if($command) { $this->setGlobalHostEventHandler($command->getId()); return true; } return false; } public function setGlobalServiceEventHandlerByName($command_name) { $c = new Criteria(); $c->add(NagiosCommandPeer::NAME); $c->setIgnoreCase(true); $command = NagiosCommandPeer::doSelectOne($c); if($command) { $this->setGlobalServiceEventHandler($command->getId()); return true; } return false; } public function setHostPerfdataCommandByName($command_name) { $c = new Criteria(); $c->add(NagiosCommandPeer::NAME); $c->setIgnoreCase(true); $command = NagiosCommandPeer::doSelectOne($c); if($command) { $this->setHostPerfdataCommand($command->getId()); return true; } return false; } public function setServicePerfdataCommandByName($command_name) { $c = new Criteria(); $c->add(NagiosCommandPeer::NAME); $c->setIgnoreCase(true); $command = NagiosCommandPeer::doSelectOne($c); if($command) { $this->setServicePerfdataCommand($command->getId()); return true; } return false; } public function setHostPerfdataFileProcessingCommandByName($command_name) { $c = new Criteria(); $c->add(NagiosCommandPeer::NAME); $c->setIgnoreCase(true); $command = NagiosCommandPeer::doSelectOne($c); if($command) { $this->setHostPerfdataFileProcessingCommand($command->getId()); return true; } return false; } public function setServicePerfdataFileProcessingCommandByName($command_name) { $c = new Criteria(); $c->add(NagiosCommandPeer::NAME); $c->setIgnoreCase(true); $command = NagiosCommandPeer::doSelectOne($c); if($command) { $this->setServicePerfdataFileProcessingCommand($command->getId()); return true; } return false; } } // NagiosMainConfiguration