This repository has been archived on 2020-01-20. You can view files and clone it, but cannot push or open issues or pull requests.
lilac/classes/NagiosDependency.php
2011-08-18 14:54:38 +00:00

46 lines
1.2 KiB
PHP
Executable file

<?php
require_once 'om/BaseNagiosDependency.php';
/**
* Skeleton subclass for representing a row from the 'nagios_dependency' table.
*
* Nagios Dependency
*
* This class was autogenerated by Propel on:
*
* Thu Dec 13 21:25:24 2007
*
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
* long as it does not already exist in the output directory.
*
* @package
*/
class NagiosDependency extends BaseNagiosDependency {
public function getType() {
if($this->getNagiosService())
return "service";
if($this->getNagiosServiceTemplate())
return "servicetemplate";
if($this->getNagiosHost())
return "host";
if($this->getNagiosHostTemplate())
return "hosttemplate";
if($this->getNagiosHostgroup())
return "hostgroup";
}
public function setDependencyPeriodByName($name) {
$timeperiod = NagiosTimeperiodPeer::getByName($name);
if(!$timeperiod)
return false;
$this->setNagiosTimeperiod($timeperiod);
$this->save();
}
} // NagiosDependency