46 lines
1.2 KiB
PHP
Executable file
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
|