1 | <?php |
||
30 | class S3UploadComponent extends BaseUploadComponent implements UploadComponentInterface |
||
31 | { |
||
32 | /** |
||
33 | * Directory for uploaded files. |
||
34 | * |
||
35 | * @var string |
||
36 | */ |
||
37 | public $uploadDirs = [ |
||
38 | UploadModelInterface::FILE_TYPE_IMAGE => 'images', |
||
39 | UploadModelInterface::FILE_TYPE_AUDIO => 'audio', |
||
40 | UploadModelInterface::FILE_TYPE_VIDEO => 'video', |
||
41 | UploadModelInterface::FILE_TYPE_APP => 'application', |
||
42 | UploadModelInterface::FILE_TYPE_TEXT => 'text', |
||
43 | UploadModelInterface::FILE_TYPE_OTHER => 'other', |
||
44 | ]; |
||
45 | |||
46 | /** |
||
47 | * AWS access key ID and secret access key. |
||
48 | * @see https://docs.aws.amazon.com/aws-sdk-php/v3/guide/guide/credentials.html |
||
49 | * |
||
50 | * @var array|callable |
||
51 | */ |
||
52 | public $credentials; |
||
53 | |||
54 | /** |
||
55 | * Region to connect to. |
||
56 | * |
||
57 | * @var string |
||
58 | */ |
||
59 | public $region = 'us-west-2'; |
||
60 | |||
61 | /** |
||
62 | * S3 client version. |
||
63 | * |
||
64 | * @var string |
||
65 | */ |
||
66 | public $clientVersion = 'latest'; |
||
67 | |||
68 | /** |
||
69 | * Amazon web services S3 default bucket. |
||
70 | * |
||
71 | * @var string |
||
72 | */ |
||
73 | public $s3DefaultBucket; |
||
74 | |||
75 | /** |
||
76 | * Buckets to upload files depending on the owner. |
||
77 | * |
||
78 | * @var array |
||
79 | */ |
||
80 | public $s3Buckets = []; |
||
81 | |||
82 | /** |
||
83 | * Amazon web services SDK S3 client. |
||
84 | * |
||
85 | * @var S3MultiRegionClient|S3ClientInterface |
||
86 | */ |
||
87 | private $s3Client; |
||
88 | |||
89 | /** |
||
90 | * Initialize. |
||
91 | */ |
||
92 | public function init() |
||
104 | |||
105 | /** |
||
106 | * Sets a mediafile model for upload file. |
||
107 | * |
||
108 | * @param Mediafile $mediafileModel |
||
109 | * |
||
110 | * @return UploadModelInterface |
||
111 | */ |
||
112 | public function setModelForSave(Mediafile $mediafileModel): UploadModelInterface |
||
127 | |||
128 | /** |
||
129 | * Sets a mediafile model for delete file. |
||
130 | * |
||
131 | * @param Mediafile $mediafileModel |
||
132 | * |
||
133 | * @return UploadModelInterface |
||
134 | */ |
||
135 | public function setModelForDelete(Mediafile $mediafileModel): UploadModelInterface |
||
146 | } |
||
147 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..