0 follower

Interface Yiisoft\Validator\DataSetInterface

Implemented byYiisoft\Validator\DataWrapperInterface

An interface for unifying access to different types of validated data. A class implementing it is called "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
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

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

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;

            
hasProperty() public abstract method

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;