Sirius\Validation\Validator::getDataWrapper PHP Méthode

getDataWrapper() public méthode

The data wrapper will be used to wrap around the data passed to the validator This way you can validate anything, not just arrays (which is the default)
public getDataWrapper ( mixed $data = null ) : Sirius\Validation\DataWrapper\WrapperInterface
$data mixed
Résultat Sirius\Validation\DataWrapper\WrapperInterface
    public function getDataWrapper($data = null)
    {
        // if $data is set reconstruct the data wrapper
        if (!$this->dataWrapper || $data) {
            $this->dataWrapper = new DataWrapper\ArrayWrapper($data);
        }
        return $this->dataWrapper;
    }