public function getValues() { $values = array(); $fieldNames = NagiosMainConfigurationPeer::getFieldNames(BasePeer::TYPE_FIELDNAME); foreach ($fieldNames as $fieldName) { $method = "get" . NagiosMainConfigurationPeer::translateFieldName($fieldName, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_PHPNAME); $val = $this->{$method}(); if ($val !== null) { $values[$fieldName] = array(); $values[$fieldName]['value'] = $val; $values[$fieldName]['source']['id'] = null; $values[$fieldName]['inherited'] = false; } } return $values; }
/** * Populates the object using an array. * * This is particularly useful when populating an object from one of the * request arrays (e.g. $_POST). This method goes through the column * names, checking to see whether a matching key exists in populated * array. If so the setByName() method is called for that column. * * You can specify the key type of the array by additionally passing one * of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. * The default key type is the column's phpname (e.g. 'AuthorId') * * @param array $arr An array to populate the object from. * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) { $keys = NagiosMainConfigurationPeer::getFieldNames($keyType); if (array_key_exists($keys[0], $arr)) { $this->setId($arr[$keys[0]]); } if (array_key_exists($keys[1], $arr)) { $this->setConfigDir($arr[$keys[1]]); } if (array_key_exists($keys[2], $arr)) { $this->setLogFile($arr[$keys[2]]); } if (array_key_exists($keys[3], $arr)) { $this->setTempFile($arr[$keys[3]]); } if (array_key_exists($keys[4], $arr)) { $this->setStatusFile($arr[$keys[4]]); } if (array_key_exists($keys[5], $arr)) { $this->setStatusUpdateInterval($arr[$keys[5]]); } if (array_key_exists($keys[6], $arr)) { $this->setNagiosUser($arr[$keys[6]]); } if (array_key_exists($keys[7], $arr)) { $this->setNagiosGroup($arr[$keys[7]]); } if (array_key_exists($keys[8], $arr)) { $this->setEnableNotifications($arr[$keys[8]]); } if (array_key_exists($keys[9], $arr)) { $this->setExecuteServiceChecks($arr[$keys[9]]); } if (array_key_exists($keys[10], $arr)) { $this->setAcceptPassiveServiceChecks($arr[$keys[10]]); } if (array_key_exists($keys[11], $arr)) { $this->setEnableEventHandlers($arr[$keys[11]]); } if (array_key_exists($keys[12], $arr)) { $this->setLogRotationMethod($arr[$keys[12]]); } if (array_key_exists($keys[13], $arr)) { $this->setLogArchivePath($arr[$keys[13]]); } if (array_key_exists($keys[14], $arr)) { $this->setCheckExternalCommands($arr[$keys[14]]); } if (array_key_exists($keys[15], $arr)) { $this->setCommandCheckInterval($arr[$keys[15]]); } if (array_key_exists($keys[16], $arr)) { $this->setCommandFile($arr[$keys[16]]); } if (array_key_exists($keys[17], $arr)) { $this->setLockFile($arr[$keys[17]]); } if (array_key_exists($keys[18], $arr)) { $this->setRetainStateInformation($arr[$keys[18]]); } if (array_key_exists($keys[19], $arr)) { $this->setStateRetentionFile($arr[$keys[19]]); } if (array_key_exists($keys[20], $arr)) { $this->setRetentionUpdateInterval($arr[$keys[20]]); } if (array_key_exists($keys[21], $arr)) { $this->setUseRetainedProgramState($arr[$keys[21]]); } if (array_key_exists($keys[22], $arr)) { $this->setUseSyslog($arr[$keys[22]]); } if (array_key_exists($keys[23], $arr)) { $this->setLogNotifications($arr[$keys[23]]); } if (array_key_exists($keys[24], $arr)) { $this->setLogServiceRetries($arr[$keys[24]]); } if (array_key_exists($keys[25], $arr)) { $this->setLogHostRetries($arr[$keys[25]]); } if (array_key_exists($keys[26], $arr)) { $this->setLogEventHandlers($arr[$keys[26]]); } if (array_key_exists($keys[27], $arr)) { $this->setLogInitialStates($arr[$keys[27]]); } if (array_key_exists($keys[28], $arr)) { $this->setLogExternalCommands($arr[$keys[28]]); } if (array_key_exists($keys[29], $arr)) { $this->setLogPassiveChecks($arr[$keys[29]]); } if (array_key_exists($keys[30], $arr)) { $this->setGlobalHostEventHandler($arr[$keys[30]]); } if (array_key_exists($keys[31], $arr)) { $this->setGlobalServiceEventHandler($arr[$keys[31]]); } if (array_key_exists($keys[32], $arr)) { $this->setExternalCommandBufferSlots($arr[$keys[32]]); } if (array_key_exists($keys[33], $arr)) { $this->setSleepTime($arr[$keys[33]]); } if (array_key_exists($keys[34], $arr)) { $this->setServiceInterleaveFactor($arr[$keys[34]]); } if (array_key_exists($keys[35], $arr)) { $this->setMaxConcurrentChecks($arr[$keys[35]]); } if (array_key_exists($keys[36], $arr)) { $this->setServiceReaperFrequency($arr[$keys[36]]); } if (array_key_exists($keys[37], $arr)) { $this->setIntervalLength($arr[$keys[37]]); } if (array_key_exists($keys[38], $arr)) { $this->setUseAggressiveHostChecking($arr[$keys[38]]); } if (array_key_exists($keys[39], $arr)) { $this->setEnableFlapDetection($arr[$keys[39]]); } if (array_key_exists($keys[40], $arr)) { $this->setLowServiceFlapThreshold($arr[$keys[40]]); } if (array_key_exists($keys[41], $arr)) { $this->setHighServiceFlapThreshold($arr[$keys[41]]); } if (array_key_exists($keys[42], $arr)) { $this->setLowHostFlapThreshold($arr[$keys[42]]); } if (array_key_exists($keys[43], $arr)) { $this->setHighHostFlapThreshold($arr[$keys[43]]); } if (array_key_exists($keys[44], $arr)) { $this->setSoftStateDependencies($arr[$keys[44]]); } if (array_key_exists($keys[45], $arr)) { $this->setServiceCheckTimeout($arr[$keys[45]]); } if (array_key_exists($keys[46], $arr)) { $this->setHostCheckTimeout($arr[$keys[46]]); } if (array_key_exists($keys[47], $arr)) { $this->setEventHandlerTimeout($arr[$keys[47]]); } if (array_key_exists($keys[48], $arr)) { $this->setNotificationTimeout($arr[$keys[48]]); } if (array_key_exists($keys[49], $arr)) { $this->setOcspTimeout($arr[$keys[49]]); } if (array_key_exists($keys[50], $arr)) { $this->setOhcpTimeout($arr[$keys[50]]); } if (array_key_exists($keys[51], $arr)) { $this->setPerfdataTimeout($arr[$keys[51]]); } if (array_key_exists($keys[52], $arr)) { $this->setObsessOverServices($arr[$keys[52]]); } if (array_key_exists($keys[53], $arr)) { $this->setOcspCommand($arr[$keys[53]]); } if (array_key_exists($keys[54], $arr)) { $this->setProcessPerformanceData($arr[$keys[54]]); } if (array_key_exists($keys[55], $arr)) { $this->setCheckForOrphanedServices($arr[$keys[55]]); } if (array_key_exists($keys[56], $arr)) { $this->setCheckServiceFreshness($arr[$keys[56]]); } if (array_key_exists($keys[57], $arr)) { $this->setFreshnessCheckInterval($arr[$keys[57]]); } if (array_key_exists($keys[58], $arr)) { $this->setDateFormat($arr[$keys[58]]); } if (array_key_exists($keys[59], $arr)) { $this->setIllegalObjectNameChars($arr[$keys[59]]); } if (array_key_exists($keys[60], $arr)) { $this->setIllegalMacroOutputChars($arr[$keys[60]]); } if (array_key_exists($keys[61], $arr)) { $this->setAdminEmail($arr[$keys[61]]); } if (array_key_exists($keys[62], $arr)) { $this->setAdminPager($arr[$keys[62]]); } if (array_key_exists($keys[63], $arr)) { $this->setExecuteHostChecks($arr[$keys[63]]); } if (array_key_exists($keys[64], $arr)) { $this->setServiceInterCheckDelayMethod($arr[$keys[64]]); } if (array_key_exists($keys[65], $arr)) { $this->setUseRetainedSchedulingInfo($arr[$keys[65]]); } if (array_key_exists($keys[66], $arr)) { $this->setAcceptPassiveHostChecks($arr[$keys[66]]); } if (array_key_exists($keys[67], $arr)) { $this->setMaxServiceCheckSpread($arr[$keys[67]]); } if (array_key_exists($keys[68], $arr)) { $this->setHostInterCheckDelayMethod($arr[$keys[68]]); } if (array_key_exists($keys[69], $arr)) { $this->setMaxHostCheckSpread($arr[$keys[69]]); } if (array_key_exists($keys[70], $arr)) { $this->setAutoRescheduleChecks($arr[$keys[70]]); } if (array_key_exists($keys[71], $arr)) { $this->setAutoReschedulingInterval($arr[$keys[71]]); } if (array_key_exists($keys[72], $arr)) { $this->setAutoReschedulingWindow($arr[$keys[72]]); } if (array_key_exists($keys[73], $arr)) { $this->setOchpTimeout($arr[$keys[73]]); } if (array_key_exists($keys[74], $arr)) { $this->setObsessOverHosts($arr[$keys[74]]); } if (array_key_exists($keys[75], $arr)) { $this->setOchpCommand($arr[$keys[75]]); } if (array_key_exists($keys[76], $arr)) { $this->setCheckHostFreshness($arr[$keys[76]]); } if (array_key_exists($keys[77], $arr)) { $this->setHostFreshnessCheckInterval($arr[$keys[77]]); } if (array_key_exists($keys[78], $arr)) { $this->setServiceFreshnessCheckInterval($arr[$keys[78]]); } if (array_key_exists($keys[79], $arr)) { $this->setUseRegexpMatching($arr[$keys[79]]); } if (array_key_exists($keys[80], $arr)) { $this->setUseTrueRegexpMatching($arr[$keys[80]]); } if (array_key_exists($keys[81], $arr)) { $this->setEventBrokerOptions($arr[$keys[81]]); } if (array_key_exists($keys[82], $arr)) { $this->setDaemonDumpsCore($arr[$keys[82]]); } if (array_key_exists($keys[83], $arr)) { $this->setHostPerfdataCommand($arr[$keys[83]]); } if (array_key_exists($keys[84], $arr)) { $this->setServicePerfdataCommand($arr[$keys[84]]); } if (array_key_exists($keys[85], $arr)) { $this->setHostPerfdataFile($arr[$keys[85]]); } if (array_key_exists($keys[86], $arr)) { $this->setHostPerfdataFileTemplate($arr[$keys[86]]); } if (array_key_exists($keys[87], $arr)) { $this->setServicePerfdataFile($arr[$keys[87]]); } if (array_key_exists($keys[88], $arr)) { $this->setServicePerfdataFileTemplate($arr[$keys[88]]); } if (array_key_exists($keys[89], $arr)) { $this->setHostPerfdataFileMode($arr[$keys[89]]); } if (array_key_exists($keys[90], $arr)) { $this->setServicePerfdataFileMode($arr[$keys[90]]); } if (array_key_exists($keys[91], $arr)) { $this->setHostPerfdataFileProcessingCommand($arr[$keys[91]]); } if (array_key_exists($keys[92], $arr)) { $this->setServicePerfdataFileProcessingCommand($arr[$keys[92]]); } if (array_key_exists($keys[93], $arr)) { $this->setHostPerfdataFileProcessingInterval($arr[$keys[93]]); } if (array_key_exists($keys[94], $arr)) { $this->setServicePerfdataFileProcessingInterval($arr[$keys[94]]); } if (array_key_exists($keys[95], $arr)) { $this->setObjectCacheFile($arr[$keys[95]]); } if (array_key_exists($keys[96], $arr)) { $this->setPrecachedObjectFile($arr[$keys[96]]); } if (array_key_exists($keys[97], $arr)) { $this->setRetainedHostAttributeMask($arr[$keys[97]]); } if (array_key_exists($keys[98], $arr)) { $this->setRetainedServiceAttributeMask($arr[$keys[98]]); } if (array_key_exists($keys[99], $arr)) { $this->setRetainedProcessHostAttributeMask($arr[$keys[99]]); } if (array_key_exists($keys[100], $arr)) { $this->setRetainedProcessServiceAttributeMask($arr[$keys[100]]); } if (array_key_exists($keys[101], $arr)) { $this->setRetainedContactHostAttributeMask($arr[$keys[101]]); } if (array_key_exists($keys[102], $arr)) { $this->setRetainedContactServiceAttributeMask($arr[$keys[102]]); } if (array_key_exists($keys[103], $arr)) { $this->setCheckResultReaperFrequency($arr[$keys[103]]); } if (array_key_exists($keys[104], $arr)) { $this->setMaxCheckResultReaperTime($arr[$keys[104]]); } if (array_key_exists($keys[105], $arr)) { $this->setCheckResultPath($arr[$keys[105]]); } if (array_key_exists($keys[106], $arr)) { $this->setMaxCheckResultFileAge($arr[$keys[106]]); } if (array_key_exists($keys[107], $arr)) { $this->setTranslatePassiveHostChecks($arr[$keys[107]]); } if (array_key_exists($keys[108], $arr)) { $this->setPassiveHostChecksAreSoft($arr[$keys[108]]); } if (array_key_exists($keys[109], $arr)) { $this->setEnablePredictiveHostDependencyChecks($arr[$keys[109]]); } if (array_key_exists($keys[110], $arr)) { $this->setEnablePredictiveServiceDependencyChecks($arr[$keys[110]]); } if (array_key_exists($keys[111], $arr)) { $this->setCachedHostCheckHorizon($arr[$keys[111]]); } if (array_key_exists($keys[112], $arr)) { $this->setCachedServiceCheckHorizon($arr[$keys[112]]); } if (array_key_exists($keys[113], $arr)) { $this->setUseLargeInstallationTweaks($arr[$keys[113]]); } if (array_key_exists($keys[114], $arr)) { $this->setFreeChildProcessMemory($arr[$keys[114]]); } if (array_key_exists($keys[115], $arr)) { $this->setChildProcessesForkTwice($arr[$keys[115]]); } if (array_key_exists($keys[116], $arr)) { $this->setEnableEnvironmentMacros($arr[$keys[116]]); } if (array_key_exists($keys[117], $arr)) { $this->setAdditionalFreshnessLatency($arr[$keys[117]]); } if (array_key_exists($keys[118], $arr)) { $this->setEnableEmbeddedPerl($arr[$keys[118]]); } if (array_key_exists($keys[119], $arr)) { $this->setUseEmbeddedPerlImplicitly($arr[$keys[119]]); } if (array_key_exists($keys[120], $arr)) { $this->setP1File($arr[$keys[120]]); } if (array_key_exists($keys[121], $arr)) { $this->setUseTimezone($arr[$keys[121]]); } if (array_key_exists($keys[122], $arr)) { $this->setDebugFile($arr[$keys[122]]); } if (array_key_exists($keys[123], $arr)) { $this->setDebugLevel($arr[$keys[123]]); } if (array_key_exists($keys[124], $arr)) { $this->setDebugVerbosity($arr[$keys[124]]); } if (array_key_exists($keys[125], $arr)) { $this->setMaxDebugFileSize($arr[$keys[125]]); } }