Example #1
0
 public function insert(array $data)
 {
     if (substr($data['entity'], 0, strlen('date')) === 'date') {
         $data['value'] = strtotime($data['value']);
     }
     return parent::insert($data);
 }
Example #2
0
 /**
  *
  * @param array $data
  * @return mixed
  */
 public function insert(array $data)
 {
     if (empty($data['created_on'])) {
         $data['created_on'] = Axis_Date::now()->toSQLString();
     }
     return parent::insert($data);
 }
Example #3
0
 /**
  * @param array $data
  * @return mixed
  */
 public function logging(array $data = array())
 {
     $pdata = array('num_results' => $data['num_results'], 'created_at' => Axis_Date::now()->toSQLString(), 'visitor_id' => Axis::single('log/visitor')->getVisitor()->id, 'customer_id' => Axis::getCustomerId(), 'site_id' => Axis::getSiteId());
     $query = Axis::single('search/log_query')->getQuery($data['query']);
     $query->hit++;
     $query->save();
     $pdata['query_id'] = $query->id;
     /* @todo analize search query */
     return parent::insert($pdata);
 }
Example #4
0
 /**
  *
  * @param array $data
  * @return mixed
  */
 public function insert(array $data)
 {
     if (empty($data['weight'])) {
         $data['weight'] = '0';
     }
     if (empty($data['price'])) {
         $data['price'] = '0';
     }
     return parent::insert($data);
 }