Interface Yiisoft\Validator\DataWrapperInterface
| Extends | Yiisoft\Validator\DataSetInterface |
|---|---|
| Implemented by | Yiisoft\Validator\DataSet\ArrayDataSet, Yiisoft\Validator\DataSet\ObjectDataSet, Yiisoft\Validator\DataSet\SingleValueDataSet |
Data wrapper interface provides access to raw data behind a 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 |
| getSource() | Get raw data that is wrapped. | Yiisoft\Validator\DataWrapperInterface |
| 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
Defined in: Yiisoft\Validator\DataSetInterface::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.
| public abstract array|null getData ( ) | ||
| return | array|null |
Validated data as array of properties or |
|---|---|---|
public function getData(): ?array;
Defined in: Yiisoft\Validator\DataSetInterface::getPropertyValue()
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;
Get raw data that is wrapped.
| public abstract mixed getSource ( ) | ||
| return | mixed |
Raw data. |
|---|---|---|
public function getSource(): mixed;
Defined in: 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.
| 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.