public function get($element, $full = false) { $ret = parent::get($element); if (!empty($ret->serial_extradata)) { $ret->serial_extradata = unserialize($ret->serial_extradata); } if ($full) { if (!empty($ret->serial_pack_id)) { $packClass = hikaserial::get('class.pack'); $ret->pack = $packClass->get($ret->serial_pack_id); } if (!empty($ret->serial_user_id)) { $userClass = hikaserial::get('shop.class.user'); $ret->user = $userClass->get($ret->serial_user_id); } if (!empty($ret->serial_order_id)) { $orderClass = hikaserial::get('shop.class.order'); $ret->order = $orderClass->get($ret->serial_order_id); } if (!empty($ret->serial_order_product_id)) { $orderProductClass = hikaserial::get('shop.class.order_product'); $ret->orderproduct = $orderProductClass->get($ret->serial_order_product_id); } $config = hikaserial::config(); if ($config->get('save_history', 1)) { $query = 'SELECT * FROM ' . hikaserial::table('history') . ' WHERE history_serial_id = ' . (int) $ret->serial_id . ' ORDER BY history_created ASC'; $this->db->setQuery($query); $ret->history = $this->db->loadObjectList(); } } return $ret; }
public function get($element, $default = null) { $ret = parent::get($element, $default); if (!empty($ret->pack_params)) { $ret->pack_params = unserialize($ret->pack_params); } return $ret; }
public function get($id, $default = NULL) { $result = parent::get($id, $default); $this->loadParams($result); return $result; }