public function setValidators(array $validators)
    {
        foreach ($validators as $validator) {
            if (is_string($validator) && is_subclass_of($validator, ValidatorInterface::class)) {
                $validator = new $validator();
            }

            $this->addValidator($validator);
        }

        return $this;
    }
public function setValidators(array $validators)
    {
        foreach ($validators as $validator) {
            if (is_string($validator) && is_subclass_of($validator, ValidatorInterface::class)) {
                $validator = new $validator();
            }

            $this->addValidator($validator);
        }

        return $this;
    }
public function setValidators ( array $ validators ) { foreach ( $ validators as $ validator ) { if ( is_string ( $ validator ) && is_subclass_of ( $ validator , ValidatorInterface :: class ) ) { $ validator = new $ validator ( ) ; } $ this -> addValidator ( $ validator ) ; } return $ this ; }
Method to set property validators

@param   ValidatorInterface[] $validators

@return  static  Return self to support chaining.
Method to set property validators