Documentation

ObjectRepository

Contract for a Doctrine persistence layer ObjectRepository class to implement.

Tags
link
www.doctrine-project.org
since
2.1
author

Benjamin Eberlei kontakt@beberlei.de

author

Jonathan Wage jonwage@gmail.com

Table of Contents

find()  : object|null
Finds an object by its primary key / identifier.
findAll()  : array<string|int, mixed>
Finds all objects in the repository.
findBy()  : array<string|int, mixed>
Finds objects by a set of criteria.
findOneBy()  : object|null
Finds a single object by a set of criteria.
getClassName()  : string
Returns the class name of the object managed by the repository.

Methods

find()

Finds an object by its primary key / identifier.

public find(mixed $id) : object|null
Parameters
$id : mixed

The identifier.

Return values
object|null

The object.

findAll()

Finds all objects in the repository.

public findAll() : array<string|int, mixed>
Return values
array<string|int, mixed>

The objects.

findBy()

Finds objects 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, mixed>

Optionally sorting and limiting details can be passed. An implementation may throw an UnexpectedValueException if certain values of the sorting or limiting details are not supported.

Parameters
$criteria : array<string|int, mixed>
$orderBy : array<string|int, mixed>|null = null
$limit : int|null = null
$offset : int|null = null
Tags
throws
UnexpectedValueException
Return values
array<string|int, mixed>

The objects.

findOneBy()

Finds a single object by a set of criteria.

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

The criteria.

Return values
object|null

The object.

getClassName()

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

public getClassName() : string
Return values
string

Search results