0 follower

Interface Yiisoft\Validator\DataWrapperInterface

ExtendsYiisoft\Validator\DataSetInterface
Implemented byYiisoft\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

Hide inherited 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

Hide inherited methods

getData() public abstract method

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 null when does not support this.

                public function getData(): ?array;

            
getPropertyValue() public abstract method

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;

            
getSource() public abstract method

Get raw data that is wrapped.

public abstract mixed getSource ( )
return mixed

Raw data.

                public function getSource(): mixed;

            
hasProperty() public abstract method

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: true - exists and false - otherwise.

                public function hasProperty(string $property): bool;