Storage
Table of Contents
Methods
- getObjectByAttachment() : File|false|null
- Returns disk object by attachment file data (creates one if not exists)
- getObjectsByFileId() : array<string|int, mixed>
- Returns disk objects by file ID
- getStorage() : Storage|false
- Returns attachments disk storage
- getUrlManager() : UrlManager|false
- Returns disk url manager
- registerAttachment() : File|false|null
- Creates disk object for attachment file
- unregisterAttachment() : void
- Deletes disk objects by file ID
Methods
getObjectByAttachment()
Returns disk object by attachment file data (creates one if not exists)
public
static getObjectByAttachment(array<string|int, mixed> $attachment[, bool $create = false ]) : File|false|null
Parameters
- $attachment : array<string|int, mixed>
-
Attachment file data.
- $create : bool = false
-
Create object if not exists.
Return values
File|false|nullgetObjectsByFileId()
Returns disk objects by file ID
public
static getObjectsByFileId(int $fileId[, int $limit = 0 ]) : array<string|int, mixed>
Parameters
- $fileId : int
-
File ID.
- $limit : int = 0
-
Limit.
Return values
array<string|int, mixed>getStorage()
Returns attachments disk storage
public
static getStorage() : Storage|false
Return values
Storage|falsegetUrlManager()
Returns disk url manager
public
static getUrlManager() : UrlManager|false
Return values
UrlManager|falseregisterAttachment()
Creates disk object for attachment file
public
static registerAttachment(array<string|int, mixed> $attachment) : File|false|null
Parameters
- $attachment : array<string|int, mixed>
-
Attachment file data.
Return values
File|false|nullunregisterAttachment()
Deletes disk objects by file ID
public
static unregisterAttachment(int $fileId) : void
Parameters
- $fileId : int
-
File ID.