IcingaConfigFile: remove different implementations
One size fits all ;)
This commit is contained in:
parent
774174052a
commit
ed8e472cba
|
@ -1,8 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Icinga\Module\Director\IcingaConfig;
|
|
||||||
|
|
||||||
class IcingaCommandsConfigFile extends IcingaConfigFile
|
|
||||||
{
|
|
||||||
protected $content = "library \"methods\"\n\n";
|
|
||||||
}
|
|
|
@ -48,7 +48,10 @@ class IcingaConfig
|
||||||
$class = 'Icinga\\Module\\Director\\IcingaConfig\\Icinga'
|
$class = 'Icinga\\Module\\Director\\IcingaConfig\\Icinga'
|
||||||
. ucfirst($type)
|
. ucfirst($type)
|
||||||
. 'sConfigFile';
|
. 'sConfigFile';
|
||||||
$file = new $class();
|
$file = new IcingaConfigFile();
|
||||||
|
if ($type === 'command') {
|
||||||
|
$file->prepend("library \"methods\"\n\n");
|
||||||
|
}
|
||||||
$file->addObjects($objects);
|
$file->addObjects($objects);
|
||||||
$this->files[$type . 's.conf'] = $file;
|
$this->files[$type . 's.conf'] = $file;
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,12 @@ class IcingaConfigFile
|
||||||
{
|
{
|
||||||
protected $content;
|
protected $content;
|
||||||
|
|
||||||
|
public function prepend($content)
|
||||||
|
{
|
||||||
|
$this->content = $content . $this->content;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
public function getContent()
|
public function getContent()
|
||||||
{
|
{
|
||||||
return $this->content;
|
return $this->content;
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Icinga\Module\Director\IcingaConfig;
|
|
||||||
|
|
||||||
class IcingaHostsConfigFile extends IcingaConfigFile
|
|
||||||
{
|
|
||||||
}
|
|
|
@ -1,7 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Icinga\Module\Director\IcingaConfig;
|
|
||||||
|
|
||||||
class IcingaServicesConfigFile extends IcingaConfigFile
|
|
||||||
{
|
|
||||||
}
|
|
|
@ -1,7 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Icinga\Module\Director\IcingaConfig;
|
|
||||||
|
|
||||||
class IcingaUsersConfigFile extends IcingaConfigFile
|
|
||||||
{
|
|
||||||
}
|
|
|
@ -1,7 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Icinga\Module\Director\IcingaConfig;
|
|
||||||
|
|
||||||
class IcingaZonesConfigFile extends IcingaConfigFile
|
|
||||||
{
|
|
||||||
}
|
|
Loading…
Reference in New Issue