1 | <?php |
||
17 | class FileBind |
||
18 | { |
||
19 | /** |
||
20 | * Bind files with owner |
||
21 | * |
||
22 | * @param Storage $storage |
||
23 | * @param int $ownerId |
||
24 | * @param int $ownerType |
||
25 | * @param int|array $fileId |
||
26 | * @return File|File[]|bool |
||
27 | */ |
||
28 | 26 | public function setBind($storage, $ownerId, $ownerType, $fileId) |
|
41 | |||
42 | /** |
||
43 | * Bind the file to the with owner |
||
44 | * |
||
45 | * @param Storage $storage |
||
46 | * @param int $ownerId |
||
47 | * @param int $ownerType |
||
48 | * @param int $fileId |
||
49 | * @return rkit\filemanager\models\File|bool |
||
50 | */ |
||
51 | 17 | private function bindSingle($storage, $ownerId, $ownerType, $fileId) |
|
69 | |||
70 | /** |
||
71 | * Bind files to the with owner |
||
72 | * |
||
73 | * @param Storage $storage |
||
74 | * @param int $ownerId |
||
75 | * @param int $ownerType |
||
76 | * @param array $files |
||
77 | * @return rkit\filemanager\models\File[]|bool |
||
78 | */ |
||
79 | 9 | private function bindMultiple($storage, $ownerId, $ownerType, $files) |
|
108 | |||
109 | /** |
||
110 | * Save temporary directory to the storage |
||
111 | * |
||
112 | * @param rkit\filemanager\models\File $file |
||
113 | * @param int $ownerId |
||
114 | * @return rkit\filemanager\models\File|bool |
||
115 | */ |
||
116 | 26 | private function saveTmpDirToStorage(File $file, $ownerId) |
|
126 | |||
127 | /** |
||
128 | * Delete current files |
||
129 | * |
||
130 | * @param Storage $storage |
||
131 | * @param int $ownerId |
||
132 | * @param int $ownerType |
||
133 | * @param rkit\filemanager\models\File $exceptFile |
||
134 | * @param rkit\filemanager\models\File[] $exceptFiles |
||
135 | * @return void |
||
136 | */ |
||
137 | 26 | private function deleteCurrentFiles($storage, $ownerId, $ownerType, $exceptFile = null, $exceptFiles = []) |
|
149 | } |
||
150 |
Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.