summaryrefslogtreecommitdiffstats
path: root/library/Businessprocess/Director/ShipConfigFiles.php
blob: 17b9e1f06a3306f3c0aedcd2aa139c527f5a0673 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php

namespace Icinga\Module\Businessprocess\Director;

use Icinga\Module\Director\Hook\ShipConfigFilesHook;
use Icinga\Module\Businessprocess\Storage\LegacyStorage;

class ShipConfigFiles extends ShipConfigFilesHook
{
    public function fetchFiles()
    {
        $files = array();

        $storage = LegacyStorage::getInstance();

        foreach ($storage->listProcesses() as $name => $title) {
            $files['processes/' . $name . '.bp'] = $storage->getSource($name);
        }

        return $files;
    }
}