当前位置: 首页>>代码示例>>PHP>>正文


PHP Employee::getInstance方法代码示例

本文整理汇总了PHP中Employee::getInstance方法的典型用法代码示例。如果您正苦于以下问题:PHP Employee::getInstance方法的具体用法?PHP Employee::getInstance怎么用?PHP Employee::getInstance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Employee的用法示例。


在下文中一共展示了Employee::getInstance方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: save_game_data

 /**
  * save game data.
  * invoked by: Controller.GameServer.save_data()
  * @param $data
  * @return bool
  */
 public function save_game_data($data)
 {
     $condition = ["gme_player" => $_SESSION['ply_id']];
     $this->Update(Utility::TABLE_GAME_DATA, $data["game_data"], $condition);
     $modal_employee = Employee::getInstance();
     $modal_employee->update_employee_status($data["employee_data"]);
     return true;
 }
开发者ID:anggadarkprince,项目名称:web-businesscareer,代码行数:14,代码来源:Memorycard.class.php

示例2: update_employee

 /**
  * update employee status.
  * role: player
  */
 public function update_employee()
 {
     if (Authenticate::is_player()) {
         if (isset($_POST['token']) && Authenticate::is_valid_token($_POST['token'])) {
             $this->model_employee = Employee::getInstance();
             $employee = $_POST['employee_data'];
             $result = $this->model_employee->update_employee_status($employee);
             $binding = array("result_var" => "session_ready", "status_var" => $result);
             binding_data($binding);
         } else {
             transport("error404");
         }
     } else {
         $binding = array("result_var" => "no_session");
         binding_data($binding);
     }
 }
开发者ID:anggadarkprince,项目名称:web-businesscareer,代码行数:21,代码来源:EmployeeController.php

示例3: detail

 /**
  * show player details, show achievement and statistic.
  * role: administrator
  * redirected from: Controller.Player.suspend() whatever suspend result
  *                  Controller.Player.reactivate() whatever reactivate result
  */
 public function detail()
 {
     if (Authenticate::is_authorized()) {
         $model_player = Player::getInstance();
         $model_journal = Journal::getInstance();
         $model_achievement = Achievement::getInstance();
         $model_asset = Asset::getInstance();
         $model_material = Material::getInstance();
         $model_employee = Employee::getInstance();
         $model_memorycard = Memorycard::getInstance();
         $id = $this->framework->url->url_part(3);
         $this->framework->view->page = "player";
         $this->framework->view->content = "/backend/pages/player_detail";
         $this->framework->view->player_detail = $model_player->player_detail($id);
         $this->framework->view->player_summary = $model_player->fetch($id);
         $this->framework->view->player_performance = $model_player->performance($id);
         $this->framework->view->player_finance = $model_journal->finance_summaries($id);
         $this->framework->view->player_achievements = $model_achievement->get_achievement($id);
         $this->framework->view->player_assets = $model_asset->get_player_asset($id);
         $this->framework->view->player_employees = $model_employee->get_player_employee($id);
         $this->framework->view->player_materials = $model_material->get_player_material($id);
         $this->framework->view->player_game = $model_memorycard->load_game_data($id);
         $this->framework->view->show("backend/template");
     } else {
         transport("administrator");
     }
 }
开发者ID:anggadarkprince,项目名称:web-businesscareer,代码行数:33,代码来源:PlayerController.php

示例4: load_data

 /**
  * load game data every play game.
  * role: player
  * @return string
  */
 public function load_data()
 {
     if (Authenticate::is_player()) {
         if (true || isset($_POST['token']) && Authenticate::is_valid_token($_POST['token'])) {
             $this->model_product = Product::getInstance();
             $this->model_material = Material::getInstance();
             $this->model_asset = Asset::getInstance();
             $this->model_supplier = Supplier::getInstance();
             $this->model_employee = Employee::getInstance();
             $this->model_achievement = Achievement::getInstance();
             $this->model_journal = Journal::getInstance();
             $this->model_memorycard = Memorycard::getInstance();
             $this->model_leaderboard = Leaderboard::getInstance();
             /*
              * retrieve data each component.
              * log this event, wrap it up and convert to json format.
              */
             $game = $this->model_memorycard->load_game_data();
             $work_history = $this->model_memorycard->get_work_stress_history();
             $total_work = $this->model_memorycard->get_total_work();
             $candidate = $this->model_employee->get_candidate();
             $employee = $this->model_employee->get_player_employee();
             $material = $this->model_material->get_material_data();
             $player_material = $this->model_material->get_player_material();
             $asset = $this->model_asset->get_asset_data();
             $player_asset = $this->model_asset->get_player_asset();
             $product = $this->model_product->get_product_data();
             $player_product = $this->model_product->get_player_product();
             $product_material = $this->model_product->get_product_material();
             $supplier = $this->model_supplier->get_supplier_data();
             $achievement = $this->model_achievement->get_achievement();
             $account = $this->model_journal->get_account();
             $simulation = $this->model_memorycard->get_simulation();
             $star = $this->model_leaderboard->get_player_ranking();
             $binding = array("result_var" => "session_ready", "game_var" => json_encode($game, JSON_PRETTY_PRINT), "candidate_var" => json_encode($candidate, JSON_PRETTY_PRINT), "employee_var" => json_encode($employee, JSON_PRETTY_PRINT), "product_var" => json_encode($product, JSON_PRETTY_PRINT), "player_product_var" => json_encode($player_product, JSON_PRETTY_PRINT), "product_material_var" => json_encode($product_material, JSON_PRETTY_PRINT), "material_var" => json_encode($material, JSON_PRETTY_PRINT), "player_material_var" => json_encode($player_material, JSON_PRETTY_PRINT), "asset_var" => json_encode($asset, JSON_PRETTY_PRINT), "player_asset_var" => json_encode($player_asset, JSON_PRETTY_PRINT), "supplier_var" => json_encode($supplier, JSON_PRETTY_PRINT), "achievement_var" => json_encode($achievement, JSON_PRETTY_PRINT), "account_var" => json_encode($account, JSON_PRETTY_PRINT), "simulation_var" => json_encode($simulation, JSON_PRETTY_PRINT), "work_history_var" => json_encode($work_history, JSON_PRETTY_PRINT), "work_total_var" => $total_work, "star" => $star["star"]);
             $log = Log::getInstance();
             $log->logging_game_load(json_encode($binding));
             binding_data($binding);
         } else {
             transport("error404");
         }
     } else {
         $binding = array("result_var" => "no_session");
         binding_data($binding);
     }
 }
开发者ID:anggadarkprince,项目名称:web-businesscareer,代码行数:51,代码来源:GameServerController.php


注:本文中的Employee::getInstance方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。