ServiceInterface
in
Contract for the Service layer.
Tags
Table of Contents
Methods
- find() : TEntity|null
- Finds a single entity by its identifier.
-
findAll()
: TEntity>, 1: int} : array{0: list
>, 1: int}) - Finds all entities matching the given criteria.
- findBy() : TEntity|null
- Finds a single entity matching the given filters.
- resolveEntityClass() : TEntity>
- Returns the root Doctrine entity class backing this service.
Methods
find()
Finds a single entity by its identifier.
public
find(array<string|int, mixed>|int $id[, array<string|int, mixed> $includes = [] ][, bool $useCache = true ]) : TEntity|null
Parameters
- $id : array<string|int, mixed>|int
- $includes : array<string|int, mixed> = []
- $useCache : bool = true
Return values
TEntity|nullfindAll()
Finds all entities matching the given criteria.
public
findAll([array<string|int, mixed> $includes = [] ][, array<string|int, mixed> $filters = [] ][, array<string|int, mixed>|null $orderBy = null ][, int|null $offset = null ][, int|null $limit = null ][, array<string|int, mixed>|null $columns = null ][, bool $computeTotalCount = false ][, bool $useCache = true ]) : TEntity>, 1: int} : array{0: list>, 1: int})
Parameters
- $includes : array<string|int, mixed> = []
- $filters : array<string|int, mixed> = []
- $orderBy : array<string|int, mixed>|null = null
- $offset : int|null = null
- $limit : int|null = null
- $columns : array<string|int, mixed>|null = null
- $computeTotalCount : bool = false
- $useCache : bool = true
Return values
TEntity>, 1: int} : array{0: list[items (or $columns rows), totalCount]
findBy()
Finds a single entity matching the given filters.
public
findBy(array<string|int, mixed> $filters[, array<string|int, mixed> $includes = [] ][, bool $useCache = true ]) : TEntity|null
Parameters
- $filters : array<string|int, mixed>
- $includes : array<string|int, mixed> = []
- $useCache : bool = true
Return values
TEntity|nullresolveEntityClass()
Returns the root Doctrine entity class backing this service.
public
resolveEntityClass() : TEntity>