original_string: public static function bindSort(\Criteria $criteria, $sort) {
          $direction = $sort['direction'];
          switch($direction) {
              case self::SORT_DIRECTION_DESC:
                  $criteria->addDescendingOrderByColumn($sort['column']);
                  break;
              case self::SORT_DIRECTION_ASC:
                  $criteria->addAscendingOrderByColumn($sort['column']);
                  break;
              default:
                  throw new RuntimeException('Unsupport Ext direct sort direction:'.$direction);
          }
      }
code: public static function bindSort(\Criteria $criteria, $sort) {
          $direction = $sort['direction'];
          switch($direction) {
              case self::SORT_DIRECTION_DESC:
                  $criteria->addDescendingOrderByColumn($sort['column']);
                  break;
              case self::SORT_DIRECTION_ASC:
                  $criteria->addAscendingOrderByColumn($sort['column']);
                  break;
              default:
                  throw new RuntimeException('Unsupport Ext direct sort direction:'.$direction);
          }
      }
code_tokens: public static function bindSort ( \ Criteria $ criteria , $ sort ) { $ direction = $ sort [ 'direction' ] ; switch ( $ direction ) { case self :: SORT_DIRECTION_DESC : $ criteria -> addDescendingOrderByColumn ( $ sort [ 'column' ] ) ; break ; case self :: SORT_DIRECTION_ASC : $ criteria -> addAscendingOrderByColumn ( $ sort [ 'column' ] ) ; break ; default : throw new RuntimeException ( 'Unsupport Ext direct sort direction:' . $ direction ) ; } }
docstring: bind Ext direct sort to Propel Criteria
  
  @param \Criteria $criteria
  @param $sort
  array(
  'direction' => 'DESC',
  'column' => UserPeer::ID
  )
  @throws RuntimeException
  @return void
docstring_tokens: bind Ext direct sort to Propel Criteria