示例#1
0
 /**
  * @return array
  */
 public function getCardClicksData()
 {
     $clicksQuery = new ClickQuery();
     $clicksQuery->groupBy(ClickTableMap::COL_CARD);
     $clicksQuery->orderByTimeCreate(Criteria::DESC);
     $clicks = $clicksQuery->find();
     // -- Copy Object to Array
     $clicksData = array();
     foreach ($clicks as $row => $click) {
         $clicksData[$row]['id'] = $click->getId();
         $clicksData[$row]['card'] = $click->getCard();
         $clicksData[$row]['clicks'] = $click->get();
         $clicksData[$row]['sort_order'] = $row;
     }
     return $clicksData;
 }