mediatekformation

UserRepository extends ServiceEntityRepository
in package
implements PasswordUpgraderInterface

Optional EntityRepository base class with a simplified constructor (for autowiring).

Interfaces, Classes, Traits and Enums

PasswordUpgraderInterface

Table of Contents

$_class  : ClassMetadata
$_em  : EntityManager
$_entityName  : string
$inflector  : Inflector
__call()  : mixed
Adds support for magic method calls.
__construct()  : mixed
Initializes a new <tt>EntityRepository</tt>.
clear()  : void
Clears the repository, causing all managed entities to become detached.
count()  : int
Counts entities by a set of criteria.
createNamedQuery()  : Query
Creates a new Query instance based on a predefined metadata named query.
createNativeNamedQuery()  : NativeQuery
Creates a native SQL query.
createQueryBuilder()  : QueryBuilder
Creates a new QueryBuilder instance that is prepopulated for this entity name.
createResultSetMappingBuilder()  : ResultSetMappingBuilder
Creates a new result set mapping builder for this entity.
find()  :
find()  : object|null
Finds an entity by its primary key / identifier.
findAll()  : array<int, object>
Finds all entities in the repository.
findAll()  :
findBy()  : array<string|int, object>
Finds entities by a set of criteria.
findBy()  :
findOneBy()  : object|null
Finds a single entity by a set of criteria.
findOneBy()  :
getClassName()  : string
Returns the class name of the object managed by the repository.
matching()  : LazyCriteriaCollection
Select all elements from a selectable that match the expression and return a new collection containing these elements.
upgradePassword()  : void
Used to upgrade (rehash) the user's password automatically over time.
getClassMetadata()  : ClassMetadata
getEntityManager()  : EntityManager
getEntityName()  : string
resolveMagicCall()  : mixed
Resolves a magic method call to the proper existent method at `EntityRepository`.

Properties

Methods

__call()

Adds support for magic method calls.

public __call(string $method, array<string|int, mixed> $arguments) : mixed
Parameters
$method : string
$arguments : array<string|int, mixed>
Tags
psalm-param

list $arguments

throws
BadMethodCallException

If the method called is invalid.

Return values
mixed —

The returned value from the resolved method.

clear()

Clears the repository, causing all managed entities to become detached.

public clear() : void
Tags
deprecated
2.8

This method is being removed from the ORM and won't have any replacement

Return values
void —

count()

Counts entities by a set of criteria.

public count(array<string|int, mixed> $criteria) : int
Parameters
$criteria : array<string|int, mixed>
Tags
psalm-param

array<string, mixed> $criteria

todo

Add this method to ObjectRepository interface in the next major release

Return values
int —

The cardinality of the objects that match the given criteria.

createNamedQuery()

Creates a new Query instance based on a predefined metadata named query.

public createNamedQuery(string $queryName) : Query
Parameters
$queryName : string
Tags
deprecated
Return values
Query —

createNativeNamedQuery()

Creates a native SQL query.

public createNativeNamedQuery(string $queryName) : NativeQuery
Parameters
$queryName : string
Tags
deprecated
Return values
NativeQuery —

createQueryBuilder()

Creates a new QueryBuilder instance that is prepopulated for this entity name.

public createQueryBuilder(string $alias[, string $indexBy = null ]) : QueryBuilder
Parameters
$alias : string
$indexBy : string = null

The index for the from.

Return values
QueryBuilder —

find()

public find(mixed $id, mixed $lockMode, mixed $lockVersion) :
Parameters
$id : mixed
$lockMode : mixed
$lockVersion : mixed
Return values
—

find()

Finds an entity by its primary key / identifier.

public find(mixed $id[, int|null $lockMode = null ][, int|null $lockVersion = null ]) : object|null
Parameters
$id : mixed

The identifier.

$lockMode : int|null = null

One of the \Doctrine\DBAL\LockMode::* constants or NULL if no specific lock mode should be used during the search.

$lockVersion : int|null = null

The lock version.

Tags
psalm-return

?T

Return values
object|null —

The entity instance or NULL if the entity can not be found.

findAll()

Finds all entities in the repository.

public findAll() : array<int, object>
Tags
psalm-return

list<T> The entities.

Return values
array<int, object> —

The objects.

findBy()

Finds entities by a set of criteria.

public findBy(array<string|int, mixed> $criteria[, array<string|int, mixed>|null $orderBy = null ][, int|null $limit = null ][, int|null $offset = null ]) : array<string|int, object>
Parameters
$criteria : array<string|int, mixed>
$orderBy : array<string|int, mixed>|null = null
$limit : int|null = null
$offset : int|null = null
Tags
psalm-param

array<string, mixed> $criteria

psalm-param

array<string, string>|null $orderBy

psalm-return

list<T>

Return values
array<string|int, object> —

The objects.

findBy()

public findBy(array<string|int, mixed> $criteria, array<string|int, mixed> $orderBy = null, mixed $limit, mixed $offset) :
Parameters
$criteria : array<string|int, mixed>
$orderBy = null : array<string|int, mixed>
$limit : mixed
$offset : mixed
Return values
—

findOneBy()

Finds a single entity by a set of criteria.

public findOneBy(array<string|int, mixed> $criteria[, array<string|int, mixed>|null $orderBy = null ]) : object|null
Parameters
$criteria : array<string|int, mixed>

The criteria.

$orderBy : array<string|int, mixed>|null = null
Tags
psalm-param

array<string, mixed> $criteria

psalm-param

array<string, string>|null $orderBy

psalm-return

?T

Return values
object|null —

The entity instance or NULL if the entity can not be found.

findOneBy()

public findOneBy(array<string|int, mixed> $criteria, array<string|int, mixed> $orderBy = null) :
Parameters
$criteria : array<string|int, mixed>
$orderBy = null : array<string|int, mixed>
Return values
—

getClassName()

Returns the class name of the object managed by the repository.

public getClassName() : string
Return values
string —

upgradePassword()

Used to upgrade (rehash) the user's password automatically over time.

public upgradePassword(UserInterface $user, string $newHashedPassword) : void
Parameters
$user : UserInterface
$newHashedPassword : string
Return values
void —

getEntityName()

protected getEntityName() : string
Return values
string —

resolveMagicCall()

Resolves a magic method call to the proper existent method at `EntityRepository`.

private resolveMagicCall(string $method, string $by, array<string|int, mixed> $arguments) : mixed
Parameters
$method : string

The method to call

$by : string

The property name used as condition

$arguments : array<string|int, mixed>
Tags
psalm-param

list $arguments The arguments to pass at method call

throws
InvalidMagicMethodCall

If the method called is invalid or the requested field/association does not exist.

Return values
mixed —

Search results