FileCollection extends EntityCollection implements DateFilterable
Tags
Table of Contents
Interfaces
Methods
- __construct() : mixed
- addDiskFilesToPreload() : void
- addToTmp() : Result
- copyTo() : Result<string|int, FileCollection>
- copyToOwnSavedFiles() : Result<string|int, FileCollection>
- copyToOwnUploadedFiles() : Result<string|int, FileCollection>
- filter() : $this
- filterByDate() : FilterResult<string|int, static|null>
- getAny() : T|null
- getById() : RestEntity|null
- getContext() : Context
- Returns the local or global context for the action.
- getDiskFiles() : array<string|int, mixed>
- getFileDiskAttributes() : array<string|int, mixed>
- getIds() : array<string|int, mixed>
- getMessageOut() : array<string|int, mixed>
- getPopupData() : PopupData
- Returns the data to be raised to the top of the REST response. Works on the principle of the composite pattern.
- getRelatedChatId() : int|null
- getRestEntityName() : string
- Returns the name of the entity that will be used in the rest response
- getUnique() : static
- initByArray() : static
- initByDiskFilesIds() : static
- merge() : static
- offsetGet() : FileItem
- offsetSet() : void
- setContext() : self
- Sets new context for operations.
- setContextUser() : self
- toRestFormat() : array<string|int, mixed>|null
- Returns an array in JSON like format to return the entity as a rest response.
- unsetByKeys() : void
- withContext() : static
- Provides local context for the action.
- withContextUser() : static
- Provides local context for the action.
Methods
__construct()
public
__construct([array<string|int, int>|array<string|int, File>|null $diskFiles = null ][, int|null $chatId = null ]) : mixed
Parameters
- $diskFiles : array<string|int, int>|array<string|int, File>|null = null
- $chatId : int|null = null
addDiskFilesToPreload()
public
static addDiskFilesToPreload(array<string|int, File> $diskFiles) : void
Parameters
- $diskFiles : array<string|int, File>
addToTmp()
public
addToTmp(string $source) : Result
Parameters
- $source : string
Return values
ResultcopyTo()
public
copyTo(Folder $folder) : Result<string|int, FileCollection>
Parameters
- $folder : Folder
Return values
Result<string|int, FileCollection>copyToOwnSavedFiles()
public
copyToOwnSavedFiles() : Result<string|int, FileCollection>
Return values
Result<string|int, FileCollection>copyToOwnUploadedFiles()
public
copyToOwnUploadedFiles() : Result<string|int, FileCollection>
Return values
Result<string|int, FileCollection>filter()
public
filter(callable $predicate) : $this
Parameters
- $predicate : callable
Return values
$thisfilterByDate()
public
filterByDate(DateTime $date) : FilterResult<string|int, static|null>
Parameters
- $date : DateTime
Return values
FilterResult<string|int, static|null>getAny()
public
getAny() : T|null
Return values
T|nullgetById()
public
getById(int $id) : RestEntity|null
Parameters
- $id : int
Return values
RestEntity|nullgetContext()
Returns the local or global context for the action.
public
getContext() : Context
Return values
ContextgetDiskFiles()
public
getDiskFiles() : array<string|int, mixed>
Return values
array<string|int, mixed>getFileDiskAttributes()
public
getFileDiskAttributes(int $chatId[, array<string|int, mixed> $options = [] ]) : array<string|int, mixed>
Parameters
- $chatId : int
- $options : array<string|int, mixed> = []
Return values
array<string|int, mixed>getIds()
public
getIds() : array<string|int, mixed>
Return values
array<string|int, mixed>getMessageOut()
public
getMessageOut() : array<string|int, mixed>
Return values
array<string|int, mixed>getPopupData()
Returns the data to be raised to the top of the REST response. Works on the principle of the composite pattern.
public
getPopupData([array<string|int, mixed> $excludedList = [] ]) : PopupData
Parameters
- $excludedList : array<string|int, mixed> = []
Return values
PopupDatagetRelatedChatId()
public
getRelatedChatId() : int|null
Return values
int|nullgetRestEntityName()
Returns the name of the entity that will be used in the rest response
public
static getRestEntityName() : string
Return values
stringgetUnique()
public
getUnique() : static
Return values
staticinitByArray()
public
static initByArray(array<string|int, RestEntity> $entities) : static
Parameters
- $entities : array<string|int, RestEntity>
Return values
staticinitByDiskFilesIds()
public
static initByDiskFilesIds(array<string|int, int> $diskFilesIds[, int|null $chatId = null ]) : static
Parameters
- $diskFilesIds : array<string|int, int>
- $chatId : int|null = null
Return values
staticmerge()
public
merge(Registry<string|int, T> $registry) : static
Parameters
- $registry : Registry<string|int, T>
Return values
staticoffsetGet()
public
offsetGet(mixed $key) : FileItem
Parameters
- $key : mixed
Return values
FileItemoffsetSet()
public
offsetSet(mixed $offset, mixed $value) : void
Parameters
- $offset : mixed
- $value : mixed
setContext()
Sets new context for operations.
public
setContext(Context|null $context) : self
Parameters
- $context : Context|null
Return values
selfsetContextUser()
public
setContextUser(mixed $user) : self
Parameters
- $user : mixed
Return values
selftoRestFormat()
Returns an array in JSON like format to return the entity as a rest response.
public
toRestFormat([array<string|int, mixed> $option = [] ]) : array<string|int, mixed>|null
Parameters
- $option : array<string|int, mixed> = []
Return values
array<string|int, mixed>|nullunsetByKeys()
public
unsetByKeys(array<string|int, mixed> $keys) : void
Parameters
- $keys : array<string|int, mixed>
withContext()
Provides local context for the action.
public
withContext(Context|null $context) : static
Parameters
- $context : Context|null
Return values
staticwithContextUser()
Provides local context for the action.
public
withContextUser(int|User|User $user) : static
Parameters
- $user : int|User|User