-
Notifications
You must be signed in to change notification settings - Fork 0
/
ResourceManagerInterface.php
executable file
·53 lines (45 loc) · 1.24 KB
/
ResourceManagerInterface.php
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php
/**
* Created by PhpStorm.
* User: danielfiebig
* Date: 04/05/15
* Time: 12:06
*/
namespace bdart\resourcemanager;
/**
* Interface ResourceManagerInterface
* @package bdart\resourcemanager
*/
/** @noinspection PhpUndefinedClassInspection */
interface ResourceManagerInterface
{
/**
* Saves a file
* @param \yii\web\UploadedFile $file the file uploaded
* @param string $name the name of the file
* @param string $folder the folder insight
* @param array $options
* @return boolean
*/
public function save($file, $name, $folder = null, $options = []);
/**
* Removes a file
* @param string $name the name of the file to remove
* @param string $folder the folder insight
* @return boolean
*/
public function delete($name, $folder = null);
/**
* Checks whether a file exists or not
* @param string $name the name of the file
* @param string $folder the folder insight
* @return boolean
*/
public function fileExists($name, $folder = null);
/**
* Returns the url of the file or empty string if the file does not exist.
* @param string $name the name of the file
* @return string
*/
public function getUrl($name);
}