ValueResolver
in package
FinalYes
Reads a value from an entity by a dotted property path (`translations.name`, `userRel.user.email`). Null-safe: a missing intermediate step returns null.
The special segment translations picks the translation of the current language through
getTranslation($langId) (TranslationCollectionTrait). Other collections continue with
their first element.
Table of Contents
Methods
- resolve() : mixed
- callGetter() : mixed
Methods
resolve()
public
static resolve(object $entity, string $path[, int|null $langId = null ]) : mixed
Parameters
- $entity : object
- $path : string
- $langId : int|null = null
callGetter()
private
static callGetter(object $object, string $property) : mixed
Parameters
- $object : object
- $property : string