当前位置: 首页>>代码示例>>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;未经允许,请勿转载。