MessageThreadMapper
extends ApiMapper
in package
FinalYes
Reading is standard ({@see ApiMapper::findAll()}); the repository only redirects the endpoint to `myThreads`. Besides that there are three mailbox write actions that are not CRUD-shaped and return a plain success flag.
Tags
Table of Contents
Properties
Methods
- __construct() : mixed
- countUnread() : int
- find() : T|null
- findAll() : T>, 1: int}
- findBy() : T|null
- hideThread() : bool
- markThreadRead() : bool
- replyToThread() : bool
- getEntityClass() : T>
- initalizeEntity() : MessageThread|null
Properties
$hydrator read-only
protected
EntityHydrator
$hydrator
$repository read-only
protected
MessageThreadRepository
$repository
Methods
__construct()
public
__construct(MessageThreadRepository $repository, EntityHydrator $hydrator) : mixed
Parameters
- $repository : MessageThreadRepository
- $hydrator : EntityHydrator
countUnread()
public
countUnread() : int
Return values
intfind()
public
find(int $pageId[, string|array<string|int, mixed> $includes = [] ][, bool|null $useCache = null ]) : T|null
Parameters
- $pageId : int
- $includes : string|array<string|int, mixed> = []
- $useCache : bool|null = null
Return values
T|nullfindAll()
public
findAll([array<string|int, mixed>|null $filters = [] ][, array<string|int, mixed>|null $orderBys = null ][, int|null $offset = null ][, int|null $limit = null ][, array<string|int, mixed>|null $columns = null ][, bool $computeTotalCount = false ][, string|array<string|int, mixed> $includes = [] ][, bool|null $useCache = null ]) : T>, 1: int}
Parameters
- $filters : array<string|int, mixed>|null = []
- $orderBys : array<string|int, mixed>|null = null
- $offset : int|null = null
- $limit : int|null = null
- $columns : array<string|int, mixed>|null = null
- $computeTotalCount : bool = false
- $includes : string|array<string|int, mixed> = []
- $useCache : bool|null = null
Return values
T>, 1: int}findBy()
public
findBy([array<string|int, mixed>|null $filters = [] ][, string|array<string|int, mixed> $includes = [] ][, bool|null $useCache = null ]) : T|null
Parameters
- $filters : array<string|int, mixed>|null = []
- $includes : string|array<string|int, mixed> = []
- $useCache : bool|null = null
Return values
T|nullhideThread()
public
hideThread(int $threadId) : bool
Parameters
- $threadId : int
Return values
boolmarkThreadRead()
public
markThreadRead(int $threadId) : bool
Parameters
- $threadId : int
Return values
boolreplyToThread()
public
replyToThread(int $threadId, string $text) : bool
Parameters
- $threadId : int
- $text : string
Return values
boolgetEntityClass()
protected
getEntityClass() : T>
Return values
T>initalizeEntity()
protected
initalizeEntity(array<string, mixed> $row) : MessageThread|null
Parameters
- $row : array<string, mixed>