Final Class Yiisoft\Hydrator\Attribute\Parameter\Data
Resolve value from the data array used for object hydration by key specified.
Public Methods
Method Details
| public mixed __construct ( string $name ) | ||
| $name | string | |
public function __construct(
private string $name,
) {
}
public function getParameterValue(
ParameterAttributeInterface $attribute,
ParameterAttributeResolveContext $context
): Result {
if (!$attribute instanceof self) {
throw new UnexpectedAttributeException(self::class, $attribute);
}
return $context->getData()->getValue($this->name);
}
Signup or Login in order to comment.