示例#1
0
 /**
  * Parses the order from the One_Query instance to understandable data for Onterspire
  *
  * @return array
  */
 private function createOrder()
 {
     $qOrders = $this->query->getOrder();
     foreach ($qOrders as $qOrder) {
         preg_match('/^([a-zA-Z0-9_]+)*(\\+|\\-)?$/', $qOrder, $matches);
         $dir = $matches[2] == '-' ? ' DESC' : 'ASC';
         $order = array('SortBy' => $matches[1], 'Direction' => $dir);
     }
     return $order;
 }