public function belongsToGroups(array $groups, Validator $validator) {
		if($this->groups === null)
			return $validator->belongsToGroups($groups);
		else {
			foreach($groups as $group) {
				if(in_array($group, $this->groups))
					return true;
			}
			return false;
		}
	}
public function belongsToGroups(array $groups, Validator $validator) {
		if($this->groups === null)
			return $validator->belongsToGroups($groups);
		else {
			foreach($groups as $group) {
				if(in_array($group, $this->groups))
					return true;
			}
			return false;
		}
	}
public function belongsToGroups ( array $ groups , Validator $ validator ) { if ( $ this -> groups === null ) return $ validator -> belongsToGroups ( $ groups ) ; else { foreach ( $ groups as $ group ) { if ( in_array ( $ group , $ this -> groups ) ) return true ; } return false ; } }
Check if the validator belongs to some groups.
@param  array     $groups
@param  Validator $validator
@return boolean
Check if the validator belongs to some groups .