Sirius\Validation\Validator::getDataWrapper PHP Method

getDataWrapper() public method

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
return 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;
    }