コード例 #1
0
 public function GetPlace($param)
 {
     $data = parent::GetPlaceProcess($param);
     $cover = parent::GetPlaceCoverProcess($param);
     $registered = parent::ListRegistrationPhotoProcess($param);
     // Dataset
     $this->id = $data['pl_id'];
     $this->token = $data['pl_token'];
     $this->owner_id = $data['pl_member_id'];
     $this->owner_name = $data['pl_member_name'];
     $this->owner_type = $data['pl_member_type'];
     $this->category_id = $data['ca_id'];
     $this->category_name = $data['ca_title'];
     $this->name = $data['pl_name'];
     $this->name_link = $this->TitleToURL($data['pl_name']);
     $this->description = $data['pl_description'];
     $this->story = $data['pl_story'];
     $this->keyword = $data['pl_keyword'];
     $this->address = $data['pl_address'];
     $this->address_real = $data['pl_address_real'];
     $this->open = $data['pl_open'];
     $this->price = $data['pl_price'];
     // Photo cover
     $this->cover_thumbnail = $cover['im_link_thumbnail'];
     $this->cover_square = $cover['im_link_square'];
     $this->cover_mini = $cover['im_link_mini'];
     $this->cover_normal = $cover['im_link_normal'];
     $this->cover_large = $cover['im_link_large'];
     // Map
     $this->latitude = $data['pl_latitude'];
     $this->longitude = $data['pl_longitude'];
     // Location
     $this->province_id = $data['pv_id'];
     $this->province_name = $data['pv_title'];
     $this->city_id = $data['cy_id'];
     $this->city_name = $data['cy_title'];
     $this->district_id = $data['ds_id'];
     $this->district_name = $data['ds_title'];
     // -----------------------------------------
     $this->city_latitude = $data['cy_latitude'];
     $this->city_longitude = $data['cy_longitude'];
     $this->district_latitude = $data['ds_latitude'];
     $this->district_longitude = $data['ds_longitude'];
     // Contact
     $this->phone = $data['pl_phone'];
     $this->website = $data['pl_website'];
     $this->facebook = $data['pl_facebook'];
     $this->twitter = $data['pl_twitter'];
     $this->instagram = $data['pl_instagram'];
     $this->line = $data['pl_line'];
     // Stat
     $this->view = $data['pl_view'];
     $this->read = $data['pl_read'];
     $this->point = $data['pl_point'];
     $this->rating = number_format($data['pl_rating'] / 1000, 2);
     // Timer
     $this->register_time = $data['pl_register_time'];
     $this->update_time = $data['pl_update_time'];
     $this->visit_time = $data['pl_visit_time'];
     $this->verify_time = $data['pl_verify_time'];
     // Option Service
     $this->wifi = $data['pl_wifi'];
     $this->carpark = $data['pl_carpark'];
     $this->credit_card = $data['pl_credit_card'];
     $this->delivery = $data['pl_delivery'];
     $this->pet = $data['pl_pet'];
     // Type & status
     $this->ip = $data['pl_ip'];
     $this->type = $data['pl_type'];
     $this->status = $data['pl_status'];
     // Notification
     $this->notification_count = parent::CountNotificationProcess(array('place_id' => $this->id));
     // Registered
     $this->registration_photo = $registered['im_link_normal'];
     // Stat
     $this->total_photo = parent::CountPlacePhotoProcess(array('place_id' => $this->id));
     $this->total_post = parent::CountPlacePostProcess(array('place_id' => $this->id));
     $this->total_talking = parent::CountPlaceTalkingProcess(array('place_id' => $this->id));
 }