getAllOrderBy() 공개 메소드

public getAllOrderBy ( ) : array
리턴 array
예제 #1
0
 /**
  * @param Select $select
  * @param array  $parts
  *
  * @return $this
  */
 protected function writeSelectOrderBy(Select $select, array &$parts)
 {
     $str = "";
     if (count($select->getAllOrderBy())) {
         $orderByArray = $select->getAllOrderBy();
         array_walk($orderByArray, function (&$orderBy) {
             $orderBy = $this->writeOrderBy($orderBy);
         });
         $str = "ORDER BY ";
         $str .= implode(", ", $orderByArray);
     }
     $parts = array_merge($parts, [$str]);
     return $this;
 }
 /**
  * @param Select $select
  * @param array  $parts
  *
  * @return $this
  */
 protected function writeSelectOrderBy(Select $select, array &$parts)
 {
     $str = '';
     if (\count($select->getAllOrderBy())) {
         $orderByArray = $select->getAllOrderBy();
         \array_walk($orderByArray, function (&$orderBy) {
             $orderBy = $this->writeOrderBy($orderBy);
         });
         $str = 'ORDER BY ';
         $str .= \implode(', ', $orderByArray);
     }
     $parts = \array_merge($parts, [$str]);
     return $this;
 }
예제 #3
0
 /**
  * @param Select $select
  * @param array  $parts
  *
  * @return $this
  */
 public function writeSelectOrderBy(Select $select, array &$parts)
 {
     $str = "";
     if (count($select->getAllOrderBy())) {
         $orderByArray = $select->getAllOrderBy();
         $me = $this;
         array_walk($orderByArray, function (&$orderBy) use($me) {
             $orderBy = $me->writeOrderBy($orderBy);
         });
         $str = "ORDER BY ";
         $str .= implode(", ", $orderByArray);
     }
     $parts = array_merge($parts, array($str));
     return $this;
 }