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


PHP Team::getSocialUserId方法代码示例

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


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

示例1: team

 public static function team(Team $team)
 {
     $forJSON = array("level" => $team->getLevel(), "experience" => $team->getExperience(), "money" => $team->getMoney(), "realMoney" => $team->getRealMoney(), "studyPoints" => $team->getStudyPoints(), "energy" => $team->getCurrentEnergy(), "energyMax" => floor($team->getEnergyMax()), "trainerId" => $team->getTrainerId(), "teamName" => $team->getTeamName(), "teamLogoId" => $team->getTeamLogoId(), "paramForward" => $team->getParameterForward(), "paramHalf" => $team->getParameterHalf(), "paramSafe" => $team->getParameterSafe(), "isInstalled" => $team->getIsInstalled(), "socialUserId" => $team->getSocialUserId(), "userPhoto" => $team->getUserPhoto(), "userName" => $team->getUserName(), "isInTeam" => $team->getIsInTeam(), "studyPointsViaPrize" => $team->getStudyPointsViaPrize(), "inGroup" => $team->getInGroup(), "counterChoose" => $team->getCounterChoose(), "counterWon" => $team->getCounterWon(), "counterLose" => $team->getCounterLose(), "stadiumId" => $team->getStadiumId(), "needDailyBonus" => $team->isNeedDailyBonus(), "placeCountry" => $team->getPlaceCountry(), "placeCity" => $team->getPlaceCity(), "placeUniversity" => $team->getPlaceUniversity(), "placeVK" => $team->getPlaceVK(), "tourIIIcounter" => $team->getTourIII(), "tourPlaceCountry" => $team->getTourPlaceCountry(), "tourPlaceCity" => $team->getTourPlaceCity(), "tourPlaceUniversity" => $team->getTourPlaceUniversity(), "tourPlaceVK" => $team->getTourPlaceVK(), "tourNotify" => $team->getTourNotify(), "tourBonus" => $team->getTourBonus(), "tourBonusTime" => $team->getTourBonusTime(), "counterChoose" => $team->getCounterChoose(), "counterWon" => $team->getCounterWon(), "counterLose" => $team->getCounterLose(), "totalPlace" => $team->getTotalPlace(), "place" => isset($team->place) ? $team->place : 99);
     if (count($team->getFootballers())) {
         $forJSON["footballers"] = JSONPrepare::footballers($team->getFootballers());
     }
     if (count($team->getSponsors())) {
         $forJSON["sponsors"] = JSONPrepare::sponsors($team->getSponsors());
     }
     return $forJSON;
 }
开发者ID:rootree,项目名称:vk-footboller-server,代码行数:11,代码来源:JSONPrepare.php

示例2: initFromRAM

 public function initFromRAM(Team $team)
 {
     $this->socialUserId = $team->getSocialUserId();
     $this->setLevel($team->getLevel());
     $this->setExperience($team->getExperience());
     $this->setMoney($team->getMoney());
     $this->setRealMoney($team->getRealMoney());
     $this->setStudyPoints($team->getStudyPoints());
     $this->setStudyPointsViaPrize($team->getStudyPointsViaPrize());
     $this->setInGroup($team->getInGroup());
     $this->setParameterForward($team->getParameterForward());
     $this->setParameterHalf($team->getParameterHalf());
     $this->setParameterSafe($team->getParameterSafe());
     $this->setEnergy($team->getCurrentEnergy());
     $this->setMaxEnergy($team->getEnergyMax());
     $this->trainerId = $team->getTrainerId();
     $this->teamName = trim($team->getTeamName());
     $this->teamLogoId = $team->getTeamLogoId();
     $this->inTeam = $team->getIsInTeam();
     $this->isAbleToChoose = $team->getIsAbleToChoose();
     $this->userPhoto = trim($team->getUserPhoto());
     $this->userName = trim($team->getUserName());
     $this->counterWon = $team->getCounterWon();
     $this->counterChoose = $team->getCounterChoose();
     $this->counterLose = $team->getCounterLose();
     $this->counterTie = $team->getCounterTie();
     $this->stadiumId = $team->getStadiumId();
     $this->setUserCountry($team->getUserCountry());
     $this->setUserCity($team->getUserCity());
     $this->setUserUniversity($team->getUserUniversity());
     $this->setPlaceCountry($team->getPlaceCountry());
     $this->setPlaceCity($team->getPlaceCity());
     $this->setPlaceUniversity($team->getPlaceUniversity());
     $this->setPlaceVK($team->getPlaceVK());
     $this->setTourIII($team->getTourIII());
     $this->setDailyBonus($team->isNeedDailyBonus());
     $this->setTourPlaceCountry($team->getTourPlaceCountry());
     $this->setTourPlaceCity($team->getTourPlaceCity());
     $this->setTourPlaceUniversity($team->getTourPlaceUniversity());
     $this->setTourPlaceVK($team->getTourPlaceVK());
     $this->setTourNotify($team->getTourNotify());
     $this->setTourBonus($team->getTourBonus());
     $this->setTourBonusTime($team->getTourBonusTime());
     $this->setIsPrized($team->getIsPrized());
     $this->setParameterSum($team->getParameterSum());
     $this->setTotalPlace($team->getTotalPlace());
     $this->setAllFootballersCount($team->getAllFootballersCount());
     $this->setAllFootballersFriendsCount($team->getAllFootballersFriendsCount());
     $this->setSponsorsCount($team->getSponsorsCount());
 }
开发者ID:rootree,项目名称:vk-footboller-server,代码行数:50,代码来源:Team.php

示例3: setLeader

 function setLeader(Team $object, $index, $forceConnect = true)
 {
     if (!$this->isRAMEnabled && !$forceConnect) {
         return null;
     }
     $result = $this->set(RAM::RAM_TYPE_LEADERS . "_" . $index, RAM::RAM_TYPE_TEAM . "_" . $object->getSocialUserId());
     if ($result === false) {
         return new ErrorPoint(ErrorPoint::CODE_RAM, "Невозможно записать данные в память", ErrorPoint::TYPE_SYSTEM);
     }
     /*     $result = $this->setTeam($object);
            if($result === false){
                return new ErrorPoint(ErrorPoint::CODE_RAM, "Невозможно записать данные в память", ErrorPoint::TYPE_SYSTEM);
            }*/
     return $result;
 }
开发者ID:rootree,项目名称:vk-footboller-server,代码行数:15,代码来源:RAM.php

示例4: initForTeam

 public static function initForTeam(Team &$team, $isGetOnlyActive = false)
 {
     $teamId = $team->getSocialUserId();
     $store = array();
     track_stats();
     // Отслеживаем производительность
     $footballersStore = RAM::getInstance()->getObjectsForTeam($teamId, RAM::RAM_TYPE_FOOTBALLER);
     track_stats();
     // Отслеживаем производительность
     $activeFootballer = 0;
     //     Utils::forDebug(count($footballersStore) . " == " . $team->getAllFootballersCount());
     if (count($footballersStore) != $team->getAllFootballersCount() || $team->getAllFootballersCount() == 0) {
         //} || GlobalParameters::$IS_FAKE_ENTER || GlobalParameters::MODER_ID == $teamId){
         $sql_template = "SELECT\n    footballers.level,\n    footballers.footballer_id,\n    footballers.is_active,\n    footballers.super,\n    footballers.health_down,\n    item_footballers.line as type FROM footballers\nLEFT JOIN  item_footballers ON item_footballers.id = footballers.footballer_id\nWHERE footballers.owner_vk_id = %d " . ($isGetOnlyActive ? " AND footballers.is_active = 1 " : "") . " ORDER BY item_footballers.line DESC ";
         $sql_template = "SELECT\n    footballers.level,\n    footballers.footballer_id,\n    footballers.is_active,\n    footballers.super,\n    footballers.health_down,\n    item_footballers.line AS typer FROM footballers, item_footballers\nWHERE footballers.owner_vk_id =  %d " . ($isGetOnlyActive ? " AND footballers.is_active = 1 " : "") . " AND item_footballers.id = footballers.footballer_id ORDER BY item_footballers.line ASC";
         $sql = sprintf($sql_template, intval($teamId));
         $SQLresult = SQL::getInstance()->query($sql);
         track_stats();
         // Отслеживаем производительность
         if ($SQLresult instanceof ErrorPoint) {
             return $SQLresult;
         }
         track_stats();
         // Отслеживаем производительность
         $team->setAllFootballersCount($SQLresult->num_rows, true);
         $counter = 0;
         $footballersStore = array();
         while ($footballer = $SQLresult->fetch_object()) {
             $footballerInstance = new Footballer();
             $footballerInstance->initFromParameters($footballer, false, $teamId, $sql);
             $footballersStore[$footballerInstance->getId()] = $footballerInstance;
             if ($footballerInstance->getIsActive() == 1) {
                 $activeFootballer++;
             }
             //RAM::getInstance()->setFootballer($footballerInstance, $teamId, $counter);
             $counter++;
         }
         track_stats();
         // Отслеживаем производительность
     } else {
         track_stats();
         // Отслеживаем производительность
         $footballersStore = array();
         if ($isGetOnlyActive) {
             $footballersStoreTeam = $footballersStore;
             foreach ($footballersStoreTeam as $footballerInstance) {
                 if ($footballerInstance->getIsActive() == 1) {
                     $footballersStore[$footballerInstance->getId()] = $footballerInstance;
                 }
                 $footballerInstance->checkHealth();
             }
         } else {
             $footballersStoreTeam = $footballersStore;
             foreach ($footballersStoreTeam as $footballerInstance) {
                 if ($footballerInstance instanceof Footballer) {
                     if ($footballerInstance instanceof Footballer && $footballerInstance->getIsActive() == 1) {
                         $activeFootballer++;
                     }
                     $footballersStore[$footballerInstance->getId()] = $footballerInstance;
                     $footballerInstance->checkHealth();
                 }
             }
         }
         track_stats();
         // Отслеживаем производительность
     }
     track_stats();
     // Отслеживаем производительность
     $footballersFriendStore = RAM::getInstance()->getObjectsForTeam($teamId, RAM::RAM_TYPE_FOOTBALLER_FRIEND);
     track_stats();
     // Отслеживаем производительность
     if (count($footballersFriendStore) != $team->getAllFootballersFriendsCount() || $team->getAllFootballersFriendsCount() == 0) {
         $sql_template = "SELECT footballers_friends.*,\n    teams.user_year,\n    teams.user_country,\n    teams.user_name,\n    teams.user_photo,\n    teams.in_team,\n    owner_team.team_name\nFROM footballers_friends\nJOIN teams ON footballers_friends.vk_id = teams.vk_id\nLEFT JOIN teams AS owner_team ON owner_team.vk_id = footballers_friends.owner_vk_id\nWHERE owner_vk_id = '%s' " . ($isGetOnlyActive ? " AND is_active = 1 " : "") . " ORDER BY footballers_friends.type DESC";
         $sql_template = "SELECT\n    footballers_friends.vk_id,\n    footballers_friends.level,\n    footballers_friends.type as typer,\n    footballers_friends.is_active,\n    footballers_friends.super,\n    footballers_friends.owner_vk_id,\n    footballers_friends.health_down,\n    teams.user_year,\n    teams.user_country,\n    teams.user_name,\n    teams.user_photo,\n    teams.in_team\nFROM footballers_friends\nJOIN teams ON footballers_friends.vk_id = teams.vk_id\nWHERE owner_vk_id = %d " . ($isGetOnlyActive ? " AND is_active = 1 " : "") . "  ORDER BY footballers_friends.type DESC";
         // ORDER BY footballers_friends.type DESC";
         $sql = sprintf($sql_template, intval($teamId));
         $SQLresult = SQL::getInstance()->query($sql);
         if ($SQLresult instanceof ErrorPoint) {
             return $SQLresult;
         }
         $team->setAllFootballersFriendsCount($SQLresult->num_rows, true);
         track_stats();
         // Отслеживаем производительность
         $footballersFriendStore = array();
         $counter = 0;
         while ($footballer = $SQLresult->fetch_object()) {
             $footballerInstance = new Footballer();
             $footballerInstance->initFromParameters($footballer, true, $teamId, $sql);
             $footballersFriendStore[$footballerInstance->getId()] = $footballerInstance;
             if ($footballerInstance->getIsActive() == 1) {
                 $activeFootballer++;
             }
             //RAM::getInstance()->setFootballerFriend($footballerInstance, $teamId, $counter);
             $counter++;
         }
         track_stats();
         // Отслеживаем производительность
     } else {
         track_stats();
         // Отслеживаем производительность
//.........这里部分代码省略.........
开发者ID:rootree,项目名称:vk-footboller-server,代码行数:101,代码来源:FootballerSatellite.php


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