Пример #1
0
 /**
  * Returns shop
  *
  * @return	RM_Shop_Object
  */
 protected function object()
 {
     if (isNull($this->_shop)) {
         $this->_shop = $this->_mapper->loadShopById($this->shop_id);
     }
     return $this->_shop;
 }
Пример #2
0
 /**
  *	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;
 }
Пример #3
0
 /**
  * Returns shop by id
  *
  * @param 	int 	$id
  *
  * @return RM_Shop_Object
  */
 public function loadShopById($id)
 {
     return $this->_mapper->loadShopById($id);
 }