[DOCUMENTATION][Entity] Improve documentation on Entity::getWithPK, explaining the ways it can be used
This commit is contained in:
parent
060a5abef1
commit
74d1874991
@ -99,7 +99,15 @@ abstract class Entity implements \JsonSerializable
|
||||
/**
|
||||
* Get an Entity from its primary key
|
||||
*
|
||||
* @param int $id
|
||||
* Support multiple formats:
|
||||
* - mixed $values - convert to array and check next
|
||||
* - array[int => mixed] $values - get keys for entity and set them in order and proceed to next case
|
||||
* - array[string => mixed] $values - Perform a regular find
|
||||
*
|
||||
* Examples:
|
||||
* Entity::getWithPK(42);
|
||||
* Entity::getWithPK([42, 'foo']);
|
||||
* Entity::getWithPK(['key1' => 42, 'key2' => 'foo'])
|
||||
*
|
||||
* @return null|static
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user