Property | Type | Description | |
---|---|---|---|
$auth | Xpressengine\User\GuardInterface | Authenticator instance | |
$distributor | Xpressengine\Storage\Distributor | distributor instance | |
$files | filesystem handler instance | ||
$keygen | key generator instance | ||
$tempFiles | temporary file creator instance |
Method | Description | |
---|---|---|
__construct ( |
constructor | |
bind ( string $fileableId, |
set the target be have a file | |
bytesByMime ( callable $scope = null ) : array | mime 별 파일 용량 정보 반환 | |
countByMime ( callable $scope = null ) : array | mime 별 파일 갯수 반환 | |
create ( string $content, string $path, string $name, string | null $disk = null, string | null $originId = null, Xpressengine\User\UserInterface $user = null ) : |
create file | |
createModel ( ) : |
create file model | |
download ( |
file download from storage | |
getDistributor ( ) : Xpressengine\Storage\Distributor | distributor instance | |
getFilesystemHandler ( ) : |
file system handler instance | |
getModel ( ) : string | Returns model class | |
getTempFileCreator ( ) : |
Returns the TempFileCreator instance | |
has ( string $fileableId, |
has | |
remove ( |
remove file | |
setDistributor ( Xpressengine\Storage\Distributor $distributor ) : void | set distributor instance | |
sync ( string $fileableId, array $fileIds = [] ) : void | Sync fileable's files to fileable | |
unBind ( string $fileableId, |
set the target be not have a file | |
unBindAll ( string $fileableId ) : void | unset all fileable's files to fileable | |
upload ( Symfony\Component\HttpFoundation\File\UploadedFile $uploaded, string $path, string | null $name = null, string | null $disk = null, Xpressengine\User\UserInterface $user = null ) : |
file upload to storage |
Method | Description | |
---|---|---|
makeFilename ( string $clientname ) : string | make file name | |
makePath ( string $id, string $path ) : string | make path name |
public __construct ( |
||
$files | filesystem handler instance | |
$auth | Xpressengine\User\GuardInterface | Authenticator instance |
$keygen | key generator instance | |
$distributor | Xpressengine\Storage\Distributor | distributor instance |
$tempFiles | temporary file creator instance |
public bytesByMime ( callable $scope = null ) : array | ||
$scope | callable | 검색 조건 |
return | array | ex.) [mime => bytes] |
public countByMime ( callable $scope = null ) : array | ||
$scope | callable | 검색 조건 |
return | array | ex.) [mime => count] |
public create ( string $content, string $path, string $name, string | null $disk = null, string | null $originId = null, Xpressengine\User\UserInterface $user = null ) : |
||
$content | string | file content |
$path | string | directory for saved |
$name | string | saved name |
$disk | string | null | disk for saved |
$originId | string | null | original file id |
$user | Xpressengine\User\UserInterface | user instance |
return |
public getDistributor ( ) : Xpressengine\Storage\Distributor | ||
return | Xpressengine\Storage\Distributor |
public getFilesystemHandler ( ) : |
||
return |
public getTempFileCreator ( ) : |
||
return |
public setDistributor ( Xpressengine\Storage\Distributor $distributor ) : void | ||
$distributor | Xpressengine\Storage\Distributor | distributor instance |
return | void |
public upload ( Symfony\Component\HttpFoundation\File\UploadedFile $uploaded, string $path, string | null $name = null, string | null $disk = null, Xpressengine\User\UserInterface $user = null ) : |
||
$uploaded | Symfony\Component\HttpFoundation\File\UploadedFile | uploaded file instance |
$path | string | be saved path |
$name | string | null | be saved file name |
$disk | string | null | disk name (ex. local, ftp, s3 ...) |
$user | Xpressengine\User\UserInterface | user instance |
return |
protected GuardInterface,Xpressengine\User $auth | ||
return | Xpressengine\User\GuardInterface |
protected Distributor,Xpressengine\Storage $distributor | ||
return | Xpressengine\Storage\Distributor |
protected FilesystemHandler,Xpressengine\Storage $files | ||
return |
protected Keygen,Xpressengine\Keygen $keygen | ||
return |