ResourceRepository implements ResourceRepositoryInterface
Table of Contents
Interfaces
Methods
- __construct() : mixed
- getById() : Resource|null
- getList() : ResourceCollection
- getTotal() : int
- remove() : void
- save() : int
Methods
__construct()
public
__construct(ResourceMapper $mapper, ResourceDataMapper $resourceDataMapper) : mixed
Parameters
- $mapper : ResourceMapper
- $resourceDataMapper : ResourceDataMapper
getById()
public
getById(int $id[, int|null $userId = null ]) : Resource|null
Parameters
- $id : int
- $userId : int|null = null
Return values
Resource|nullgetList()
public
getList([int|null $limit = null ][, int|null $offset = null ][, ConditionTree|null $filter = null ][, array<string|int, mixed>|null $sort = null ][, int|null $userId = null ]) : ResourceCollection
Parameters
- $limit : int|null = null
- $offset : int|null = null
- $filter : ConditionTree|null = null
- $sort : array<string|int, mixed>|null = null
- $userId : int|null = null
Return values
ResourceCollectiongetTotal()
public
getTotal([ConditionTree|null $filter = null ][, int|null $userId = null ]) : int
Parameters
- $filter : ConditionTree|null = null
- $userId : int|null = null
Return values
intremove()
public
remove(int $resourceId) : void
Parameters
- $resourceId : int
save()
public
save(Resource $resource) : int
Parameters
- $resource : Resource