Doctrine\ORM\Persisters\BasicEntityPersister::load
Loads an entity by a list of field criteria.
Signature
public function load(array
$criteria,
[
$entity = null,
[The
$assoc = null,
[array
$hints = 0,
[int
$lockMode = 0,
[int
$limit = null,
[array
$orderBy = null]]]]]] )
Parameters
$criteria
— array- The criteria by which to load the entity.
$entity
— object- The entity to load the data into. If not specified,
a new entity is created. $assoc
— object- association that connects the entity to load to another entity, if any.
$hints
— array- Hints for entity creation.
$lockMode
— integer$limit
— int- Limit number of results
$orderBy
— array- Criteria to order by
Returns
- The loaded and managed entity instance or NULL if the entity can not be found.
Line | Task |
---|---|
666+ | Check identity map? loadById method? Try to guess whether $criteria is the id? |