summaryrefslogtreecommitdiff
path: root/vendor/thecodingmachine/safe/generated/rrd.php
blob: 9bb3b5c528c3f3a6b21898901fbdc9114c2486b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php

namespace Safe;

use Safe\Exceptions\RrdException;

/**
 * Creates the rdd database file.
 *
 * @param string $filename Filename for newly created rrd file.
 * @param array $options Options for rrd create - list of strings. See man page of rrd create
 * for whole list of options.
 * @throws RrdException
 *
 */
function rrd_create(string $filename, array $options): void
{
    error_clear_last();
    $result = \rrd_create($filename, $options);
    if ($result === false) {
        throw RrdException::createFromPhpError();
    }
}