Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
n/a
0 / 0
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2
3/**
4 * Karla ImageMagick wrapper library
5 *
6 * PHP Version 8.0<
7 *
8 * @category Utility
9 * @author   Johannes Skov Frandsen <jsf@greenoak.dk>
10 * @license  http://www.opensource.org/licenses/mit-license.php MIT
11 * @link     https://github.com/localgod/karla Karla
12 * @since    2012-04-05
13 */
14
15declare(strict_types=1);
16
17namespace Karla;
18
19/**
20 * Interface for Karla caching tools
21 *
22 * @category Utility
23 * @author   Johannes Skov Frandsen <jsf@greenoak.dk>
24 * @license  http://www.opensource.org/licenses/mit-license.php MIT
25 * @link     https://github.com/localgod/karla Karla
26 */
27interface Cache
28{
29    /**
30     * Check if there exists a cached version of the file
31     *
32     * @param string $inputFile Path to file
33     * @param string $outputFile Path to file
34     * @param array<string> $options Options
35     */
36    public function isCached(string $inputFile, string $outputFile, array $options): bool;
37
38    /**
39     * Get cached version of the file
40     *
41     * @param string $inputFile Path to file
42     * @param string $outputFile Path to file
43     * @param array<string> $options Options
44     */
45    public function getCached(string $inputFile, string $outputFile, array $options): string;
46
47    /**
48     * Set cached version of the file
49     *
50     * @param string $inputFile Path to file
51     * @param string $outputFile Path to file
52     * @param array<string> $options Options
53     */
54    public function setCache(string $inputFile, string $outputFile, array $options): void;
55}