PHP Classes

File: src/Validator/Adapter/ValidatorAdapterZf.php

Recommend this page to a friend!
  Classes of Derek McLean   HTML Forms   src/Validator/Adapter/ValidatorAdapterZf.php   Download  
File: src/Validator/Adapter/ValidatorAdapterZf.php
Role: Class source
Content type: text/plain
Description: Class source
Class: HTML Forms
Generate and validate submitted HTML forms
Author: By
Last change:
Date: 6 years ago
Size: 786 bytes
 

Contents

Class file image Download
<?php

namespace Del\Form\Validator\Adapter;

use
Del\Form\Validator\ValidatorInterface;
use
Exception;
use
Zend\Validator\ValidatorInterface as ZendValidatorInterface;

class
ValidatorAdapterZf implements ValidatorInterface
{
    private
$validator;

   
/**
     * ValidatorAdapterZf constructor.
     */
   
public function __construct(ZendValidatorInterface $validator)
    {
       
$this->validator = $validator;
    }

   
/**
     * @param mixed $value
     * @return bool
     * @throws Exception If validation of $value is impossible
     */
   
public function isValid($value)
    {
        return
$this->validator->isValid($value);
    }

   
/**
     * @return array
     */
   
public function getMessages()
    {
        return
$this->validator->getMessages();
    }


}