ArmorRepository
extends ServiceEntityRepository
in package
Uses
EntityRepositoryTrait
Table of Contents
- $repositoryHydrator : mixed
- __construct() : mixed
- createTranslatebleQuery() : Query
- Create query for translate entity.
- extractEntity() : array<string|int, mixed>
- Extract values from an object with class methods.
- findArmorsById() : array<string|int, mixed>|null
- Get an array by ids.
- findByLevel() : array<string|int, mixed>
- Get a translated list for a level.
- findOneArmorById() : array<string|int, mixed>|null
- Find one by id.
- getMaxArmorLevel() : int
- Get de max level of armors.
- getNextDefenseLevel() : int
- Get next defense in level of armors.
- getPaginator() : Paginator
- Get a pagination for a result.
- getQueryBuilder() : QueryBuilder
- Get a instance of query builder.
- hydrateEntity() : object
- Hydrate an object by populating getter/setter methods.
- getHydrator() : ClassMethodsHydrator
- Get Hydrator instance.
Properties
$repositoryHydrator
protected
mixed
$repositoryHydrator
Methods
__construct()
public
__construct(ManagerRegistry $registry) : mixed
Parameters
- $registry : ManagerRegistry
Return values
mixed —createTranslatebleQuery()
Create query for translate entity.
public
createTranslatebleQuery(string $dql) : Query
Parameters
- $dql : string
-
Note: If pass a "Doctrine\ORM\QueryBuilder" auto-get a DQL string
Return values
Query —extractEntity()
Extract values from an object with class methods.
public
extractEntity(object|array<string|int, mixed> $object) : array<string|int, mixed>
Parameters
- $object : object|array<string|int, mixed>
Return values
array<string|int, mixed> —findArmorsById()
Get an array by ids.
public
findArmorsById(array<string|int, mixed> $ids) : array<string|int, mixed>|null
Entities is translated.
Parameters
- $ids : array<string|int, mixed>
Return values
array<string|int, mixed>|null —findByLevel()
Get a translated list for a level.
public
findByLevel(int $level) : array<string|int, mixed>
Parameters
- $level : int
Return values
array<string|int, mixed> —findOneArmorById()
Find one by id.
public
findOneArmorById(int $id) : array<string|int, mixed>|null
Entity is translated.
Parameters
- $id : int
Return values
array<string|int, mixed>|null —getMaxArmorLevel()
Get de max level of armors.
public
getMaxArmorLevel([int $dragonKills = null ]) : int
Parameters
- $dragonKills : int = null
Return values
int —getNextDefenseLevel()
Get next defense in level of armors.
public
getNextDefenseLevel(int $level) : int
Parameters
- $level : int
Return values
int —getPaginator()
Get a pagination for a result.
public
getPaginator(QueryBuilder $query[, int $page = 1 ][, int $perPage = 25 ][, int $resultType = DoctrineAdapter::RESULT_ARRAY ]) : Paginator
Parameters
- $query : QueryBuilder
- $page : int = 1
- $perPage : int = 25
- $resultType : int = DoctrineAdapter::RESULT_ARRAY
Return values
Paginator —getQueryBuilder()
Get a instance of query builder.
public
getQueryBuilder() : QueryBuilder
Return values
QueryBuilder —hydrateEntity()
Hydrate an object by populating getter/setter methods.
public
hydrateEntity(array<string|int, mixed> $data[, object|null $entity = null ]) : object
Parameters
- $data : array<string|int, mixed>
- $entity : object|null = null
Return values
object —getHydrator()
Get Hydrator instance.
protected
getHydrator() : ClassMethodsHydrator