File tree Expand file tree Collapse file tree 1 file changed +47
-0
lines changed
Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+ namespace Appwrite ;
3+
4+ class InputFile {
5+ private ?string $data ;
6+ private ?string $mimeType ;
7+ private ?string $filename ;
8+ private ?string $path ;
9+
10+ public function __construct (){}
11+
12+ public function getData (): ? string
13+ {
14+ return $this -> data ;
15+ }
16+
17+ public function getPath (): ? string
18+ {
19+ return $this -> path ;
20+ }
21+
22+ public function getMimeType (): ? string
23+ {
24+ return $this -> mimeType ;
25+ }
26+
27+ public function getFilename (): ? string
28+ {
29+ return $this -> filename ;
30+ }
31+
32+ public static function withPath (string $path , ? string $mimeType , ? string $filename )
33+ {
34+ $instance = new InputFile ();
35+ $instance -> path = $path ;
36+ $instance -> mimeType = $mimeType ;
37+ $instance -> filename = $filename ;
38+ }
39+
40+ public static function withData (string $data , ? string $mimeType , ? string $filename )
41+ {
42+ $instance = new InputFile ();
43+ $instance -> data = $data ;
44+ $instance -> mimeType = $mimeType ;
45+ $instance -> filename = $filename ;
46+ }
47+ }
You can’t perform that action at this time.
0 commit comments