1 | <?php |
||
17 | class FileBind |
||
18 | { |
||
19 | /** |
||
20 | * Bind the file to the with owner |
||
21 | * |
||
22 | * @param Storage $storage |
||
23 | * @param int $ownerId |
||
24 | * @param int $ownerType |
||
25 | * @param int $fileId |
||
26 | * @return rkit\filemanager\models\File|bool |
||
27 | */ |
||
28 | 18 | public function bindSingle($storage, $ownerId, $ownerType, $fileId) |
|
45 | |||
46 | /** |
||
47 | * Bind files to the with owner |
||
48 | * |
||
49 | * @param Storage $storage |
||
50 | * @param int $ownerId |
||
51 | * @param int $ownerType |
||
52 | * @param array $files |
||
53 | * @return rkit\filemanager\models\File[]|bool |
||
54 | */ |
||
55 | 9 | public function bindMultiple($storage, $ownerId, $ownerType, $files) |
|
83 | |||
84 | /** |
||
85 | * Save temporary directory to the storage |
||
86 | * |
||
87 | * @param File $file |
||
88 | * @param int $ownerId |
||
89 | * @return rkit\filemanager\models\File|bool |
||
90 | */ |
||
91 | 26 | private function saveTmpDirToStorage(File $file, $ownerId) |
|
101 | |||
102 | /** |
||
103 | * Delete current files |
||
104 | * |
||
105 | * @param Storage $storage |
||
106 | * @param int $ownerId |
||
107 | * @param int $ownerType |
||
108 | * @param rkit\filemanager\models\File $exceptFile |
||
109 | * @param rkit\filemanager\models\File[] $exceptFiles |
||
110 | * @return void |
||
111 | */ |
||
112 | 26 | private function deleteCurrentFiles($storage, $ownerId, $ownerType, $exceptFile = null, $exceptFiles = []) |
|
124 | } |
||
125 |
Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.