framework/web/CArrayDataProvider.php
protected function getSortDirections($order)
	{
		$segs=explode(',',$order);
		$directions=array();
		foreach($segs as $seg)
		{
			if(preg_match('/(.*?)(\s+(desc|asc))?$/i',trim($seg),$matches))
				$directions[$matches[1]]=isset($matches[3]) && !strcasecmp($matches[3],'desc');
			else
				$directions[trim($seg)]=false;
		}
		return $directions;
	}
protected function getSortDirections($order)
	{
		$segs=explode(',',$order);
		$directions=array();
		foreach($segs as $seg)
		{
			if(preg_match('/(.*?)(\s+(desc|asc))?$/i',trim($seg),$matches))
				$directions[$matches[1]]=isset($matches[3]) && !strcasecmp($matches[3],'desc');
			else
				$directions[trim($seg)]=false;
		}
		return $directions;
	}
protected function getSortDirections ( $ order ) { $ segs = explode ( ',' , $ order ) ; $ directions = array ( ) ; foreach ( $ segs as $ seg ) { if ( preg_match ( '/(.*?)(\s+(desc|asc))?$/i' , trim ( $ seg ) , $ matches ) ) $ directions [ $ matches [ 1 ] ] = isset ( $ matches [ 3 ] ) && ! strcasecmp ( $ matches [ 3 ] , 'desc' ) ; else $ directions [ trim ( $ seg ) ] = false ; } return $ directions ; }
Converts the "ORDER BY" clause into an array representing the sorting directions.
@param string $order the "ORDER BY" clause.
@return array the sorting directions (field name => whether it is descending sort)
Converts the ORDER BY clause into an array representing the sorting directions .