aboutsummaryrefslogtreecommitdiff
path: root/lib/classes/assets/AssetFactory.php
blob: 3d971f400b5a746d9442e31b94a1f8dbb4ea3b20 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
namespace Assets;

/**
 * Interface for the assets factory.
 *
 * Implement your own factory and asset objects if you want to use
 * your own storage for assets.
 *
 * @author  Jan-Hendrik Willms <tleilax+studip@gmail.com>
 * @license GPL2 or any later version
 * @since   Stud.IP 3.4
 */
interface AssetFactory
{
    /**
     * Restores or create a css file based on the given information.
     *
     * @param String $filename Filename of the original file
     * @param Array  $metadata Potential metadata
     * @return Assets\Asset
     */
    public function createCSSFile($filename, array $metadata = []);

    /**
     * Restores or create a js file based on the given information.
     *
     * @param String $filename Filename of the original file
     * @param Array  $metadata Potential metadata
     * @return Assets\Asset
     */
    public function createJSFile($filename, array $metadata = []);
}