Sirius\Validation\Validator::getDataWrapper PHP 메소드

getDataWrapper() 공개 메소드

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
리턴 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;
    }