Interface Yiisoft\Validator\DataSetInterface
| Implemented by | Yiisoft\Validator\DataWrapperInterface |
|---|
An interface for unifying access to different types of validated data. A class implementing it is called "data set".
Public Methods
| Method | Description | Defined By |
|---|---|---|
| getData() | Returns the validated data as an associative array, where keys are property names and values are their
corresponding values. null means that implementation does not support getting an array of properties. |
Yiisoft\Validator\DataSetInterface |
| getPropertyValue() | Returns a property value by its name. | Yiisoft\Validator\DataSetInterface |
| hasProperty() | Whether a data set has the property with a given name. Note that this means existence only and properties with empty values are treated as present. | Yiisoft\Validator\DataSetInterface |
Method Details
Returns the validated data as an associative array, where keys are property names and values are their
corresponding values. null means that implementation does not support getting an array of properties.
| public abstract array|null getData ( ) | ||
| return | array|null |
Validated data as array of properties or |
|---|---|---|
public function getData(): ?array;
Returns a property value by its name.
| public abstract mixed getPropertyValue ( string $property ) | ||
| $property | string |
Property name. |
| return | mixed |
Property value. |
|---|---|---|
public function getPropertyValue(string $property): mixed;
Whether a data set has the property with a given name. Note that this means existence only and properties with empty values are treated as present.
| public abstract boolean hasProperty ( string $property ) | ||
| $property | string |
Property name. |
| return | boolean |
Whether the property exists: |
|---|---|---|
public function hasProperty(string $property): bool;
Signup or Login in order to comment.