<?php

namespace App\Validator;

use Zend\Validator\Hostname;
use Zend\Validator\EmailAddress;

class Zone extends Common 
{
    
    public function isValid($zone) 
    {
        foreach (['width','height','targets','selectors'] as $field) {
            if(!$zone[$field]) {
                return false;
            }
        }
        return true;
    }
    
    protected function validateInstance($entity)
    {            
        return $entity instanceof \App\Entity\Zone;
    }    
}
