當前位置: 首頁>>代碼示例>>PHP>>正文


PHP TenYear::data_name方法代碼示例

本文整理匯總了PHP中TenYear::data_name方法的典型用法代碼示例。如果您正苦於以下問題:PHP TenYear::data_name方法的具體用法?PHP TenYear::data_name怎麽用?PHP TenYear::data_name使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在TenYear的用法示例。


在下文中一共展示了TenYear::data_name方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: get_data

 protected function get_data($name, $isOne = false)
 {
     $className = TenYear::data_name($name);
     if ($isOne) {
         return new $className();
     }
     //$this->_objData[$className]++;
     return TenYear::getInstance($className);
 }
開發者ID:bluefan,項目名稱:phpsource,代碼行數:9,代碼來源:Data.php

示例2: run

 public function run()
 {
     $sql = "select * from test_account";
     $this->query($sql);
     while ($this->next_record()) {
         $player_id = $this->get_field('player_id');
         $objPropData = TenYear::getInstance(TenYear::data_name('PlayerProp'));
         $prop_list = $objPropData->get_player_prop_by_item_position($player_id);
         if (!empty($prop_list)) {
             foreach ($prop_list as $prop) {
                 $objPropData->delete_player_prop($player_id, $prop);
             }
         }
         echo "player:{$player_id} suc\n";
     }
 }
開發者ID:bluefan,項目名稱:phpsource,代碼行數:16,代碼來源:clear_robot_bag.php

示例3: run

 public function run()
 {
     $keys = Com_AdCache::factory('player')->keys("data|player:*");
     if (!empty($keys)) {
         foreach ($keys as $key) {
             $player_info = $this->redis()->hash_get($key, array('player_id', 'level', 'union_id'));
             if (intval($player_info['player_id']) <= 0) {
                 continue;
             }
             if (intval($player_info['level']) < 20) {
                 continue;
             }
             $objPlayerProp = TenYear::getInstance(TenYear::data_name('PlayerProp'));
             $player_props = $objPlayerProp->get_player_all_prop($player_info['player_id']);
             foreach ($player_props as $prop) {
                 if (isset($prop['intensive_level'])) {
                     echo "player_id={$player_info['player_id']}|player_prop_id={$prop['player_prop_id']}\n";
                     $objPlayerAchieve = TenYear::getInstance(TenYear::game_name('PlayerAchieve'));
                     $objPlayerAchieve->async_trigger_achieve_target($player_info['player_id'], 6, "1:" . $prop['quality'] . ":" . $prop['star_level'] . ":" . intval($prop['intensive_level']) . ":{$prop['player_prop_id']}", 4);
                 }
             }
         }
     }
 }
開發者ID:bluefan,項目名稱:phpsource,代碼行數:24,代碼來源:test_player_achieve.php

示例4: sys_data

 public function sys_data($player_info)
 {
     TenYear::getInstance(TenYear::data_name('UnionInfo'))->set_union_player_sum_fpower($player_info['union_id'], $player_info['player_id'], $player_info['sum_fpower']);
     echo $player_info['player_id'] . "--union_id=" . $player_info['union_id'] . "sync suc \n";
 }
開發者ID:bluefan,項目名稱:phpsource,代碼行數:5,代碼來源:union_rank.php

示例5: clear_bag

 public function clear_bag($player_id)
 {
     $objPropData = TenYear::getInstance(TenYear::data_name('PlayerProp'));
     $prop_list = $objPropData->get_player_prop_by_item_position($player_id);
     if (!empty($prop_list)) {
         foreach ($prop_list as $prop) {
             $objPropData->delete_player_prop($player_id, $prop);
         }
     }
     echo "send success";
 }
開發者ID:bluefan,項目名稱:phpsource,代碼行數:11,代碼來源:send.php

示例6: get_data

 /**
  * 獲取數據模型
  * @param string $name
  * @param boolean $isOne
  */
 protected static function get_data($name, $isOne = false)
 {
     $className = TenYear::data_name($name);
     if ($isOne) {
         return new $className();
     }
     return TenYear::getInstance($className);
 }
開發者ID:bluefan,項目名稱:phpsource,代碼行數:13,代碼來源:Protocol.php

示例7: asyn_call_func

 /**
  * 異步回調方法
  *
  * @param unknown_type $className	類名
  * @param unknown_type $classType	類類型 game, data, 空則表示全名
  * @param unknown_type $function	方法名
  * @param unknown_type $params		參數數組
  * @return unknown
  */
 public static function asyn_call_func($className, $classType, $function, $params)
 {
     $call = array();
     if ($classType == 'game') {
         $class['class'] = TenYear::game_name($className);
     } elseif ($classType == 'data') {
         $class['class'] = TenYear::data_name($className);
     } else {
         $class['class'] = $className;
     }
     $class['function'] = $function;
     $class['params'] = $params;
     return Com_Queued::send(self::$asynCallQueue, json_encode($class));
 }
開發者ID:bluefan,項目名稱:phpsource,代碼行數:23,代碼來源:Replication.php


注:本文中的TenYear::data_name方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。