src/classes/CCModel.php
protected function _type_assignment_set( $type, $value )
	{
		switch ( $type ) 
		{
			case 'int':
			case 'timestamp':
				return (int) $value;
			break;

			case 'string':
				return (string) $value;
			break;

			case 'bool':
				return (bool) $value;
			break;

			// json datatype simply encode
			case 'json':
				return json_encode( $value );
			break;
		}

		return $value;
	}
protected function _type_assignment_set( $type, $value )
	{
		switch ( $type ) 
		{
			case 'int':
			case 'timestamp':
				return (int) $value;
			break;

			case 'string':
				return (string) $value;
			break;

			case 'bool':
				return (bool) $value;
			break;

			// json datatype simply encode
			case 'json':
				return json_encode( $value );
			break;
		}

		return $value;
	}
protected function _type_assignment_set ( $ type , $ value ) { switch ( $ type ) { case 'int' : case 'timestamp' : return ( int ) $ value ; break ; case 'string' : return ( string ) $ value ; break ; case 'bool' : return ( bool ) $ value ; break ; // json datatype simply encode case 'json' : return json_encode ( $ value ) ; break ; } return $ value ; }
Assign the data type in a set operation

@param string 	$type
@param mixed 		$value
@return mixed
Assign the data type in a set operation