lib/ValidationOne.php
private function getTypeFamily($type) {
		if (is_array($type)) {
			$r=[];
			foreach($type as $key=>$t) {
				$r[$key]=$this->getTypeFamily($t);
			}
		} else {
			switch (1 == 1) {
				case (strpos($this->STRARR, $type) !== false):
					$r = 1; // string
					break;
				case (strpos($this->DATARR, $type) !== false):
					$r = 2; // date
					break;
				case ($type == 'boolean'):
					$r = 3; // boolean
					break;
				case ($type == 'file'):
					$r = 4; // file
					break;
				default:
					$r = 0; // number
			}
		}
		return $r;
	}
private function getTypeFamily($type) {
		if (is_array($type)) {
			$r=[];
			foreach($type as $key=>$t) {
				$r[$key]=$this->getTypeFamily($t);
			}
		} else {
			switch (1 == 1) {
				case (strpos($this->STRARR, $type) !== false):
					$r = 1; // string
					break;
				case (strpos($this->DATARR, $type) !== false):
					$r = 2; // date
					break;
				case ($type == 'boolean'):
					$r = 3; // boolean
					break;
				case ($type == 'file'):
					$r = 4; // file
					break;
				default:
					$r = 0; // number
			}
		}
		return $r;
	}
private function getTypeFamily ( $ type ) { if ( is_array ( $ type ) ) { $ r = [ ] ; foreach ( $ type as $ key => $ t ) { $ r [ $ key ] = $ this -> getTypeFamily ( $ t ) ; } } else { switch ( 1 == 1 ) { case ( strpos ( $ this -> STRARR , $ type ) !== false ) : $ r = 1 ; // string break ; case ( strpos ( $ this -> DATARR , $ type ) !== false ) : $ r = 2 ; // date break ; case ( $ type == 'boolean' ) : $ r = 3 ; // boolean break ; case ( $ type == 'file' ) : $ r = 4 ; // file break ; default : $ r = 0 ; // number } } return $ r ; }
It returns the number of the family.
@param string|array $type=['integer','unixtime','boolean','decimal','float','varchar','string','date','datetime','file'][$i]
@return int|int[] 1=string,2=date,3=boolean,4=file,0=number
It returns the number of the family .