models/CiiSettingsModel.php
public function getStringValidator($attribute=NULL, $validators=NULL)
	{
		if ($attribute == NULL && $validators == NULL)
			return array();

		$v = array();
		if ($validators == NULL && $attribute !== NULL)
			$validators = $this->getValidators($attribute);

		$validators = array_values($validators);

		foreach ($validators as $validator)
		{
			$ve = strtolower(str_replace('Validator', '', substr(get_class($validator), 1, strlen(get_class($validator)))));
			if ($ve == 'inline')
				$v[] = $validator->method;
			else
				$v[] = $ve;
		}

		return $v;
	}
public function getStringValidator($attribute=NULL, $validators=NULL)
	{
		if ($attribute == NULL && $validators == NULL)
			return array();

		$v = array();
		if ($validators == NULL && $attribute !== NULL)
			$validators = $this->getValidators($attribute);

		$validators = array_values($validators);

		foreach ($validators as $validator)
		{
			$ve = strtolower(str_replace('Validator', '', substr(get_class($validator), 1, strlen(get_class($validator)))));
			if ($ve == 'inline')
				$v[] = $validator->method;
			else
				$v[] = $ve;
		}

		return $v;
	}
public function getStringValidator ( $ attribute = NULL , $ validators = NULL ) { if ( $ attribute == NULL && $ validators == NULL ) return array ( ) ; $ v = array ( ) ; if ( $ validators == NULL && $ attribute !== NULL ) $ validators = $ this -> getValidators ( $ attribute ) ; $ validators = array_values ( $ validators ) ; foreach ( $ validators as $ validator ) { $ ve = strtolower ( str_replace ( 'Validator' , '' , substr ( get_class ( $ validator ) , 1 , strlen ( get_class ( $ validator ) ) ) ) ) ; if ( $ ve == 'inline' ) $ v [ ] = $ validator -> method ; else $ v [ ] = $ ve ; } return $ v ; }
Gets the validator types as strings to be used for the form parser
@param  string     $attribute  The property name we want to work with
@param  CValidator $validators Often times we may already have the validator, so if this is provided, it will be used instead of fetching
the validators for the property
@return array      The validators as clean strings (required, boolean, string, url, number...etc)
Gets the validator types as strings to be used for the form parser