/** * Returns shop * * @return RM_Shop_Object */ protected function object() { if (isNull($this->_shop)) { $this->_shop = $this->_mapper->loadShopById($this->shop_id); } return $this->_shop; }
/** * Description... * * @return void **/ public function shop() { if (!isset($this->_shop)) { if (isNull($this->_shop = $this->_mapper->loadShopById($this->shop_id))) { $res = M('Base')->result(); $res->error('shop_is_not_exist'); throw new RM_Validator_Exception($res); } } return $this->_shop; }
/** * Returns shop by id * * @param int $id * * @return RM_Shop_Object */ public function loadShopById($id) { return $this->_mapper->loadShopById($id); }