Gets the trophy information for the Game.

@return object|null
481459
public function trophyInfo() : ?object
    {
        if ($this->game === null) {
            // Kind of a hack here.
            // This endpoint doesn't give exactly the same information as the proper Game endpoint would,
            // But I wasn't able to find a way to get info from the Game endpoint with just a titleId.
            // It works, but I'd rather it be more consistent with the other endpoint.
            $game = $this->get(Trophy::TROPHY_ENDPOINT . 'apps/trophyTitles', [
                'npTitleIds' => $this->titleId,
                'fields' => '@default',
                'npLanguage' => 'en'
            ]);
            
            if (!count($game->apps) || !count($game->apps[0]->trophyTitles)) return null;

            $this->npCommunicationId = $game->apps[0]->trophyTitles[0]->npCommunicationId;

            $data = [
                'npLanguage' => 'en'
            ];

            if ($this->comparing()) {
                $data['comparedUser'] = $this->user()->onlineId();
            }

            $game = $this->get(sprintf(Trophy::TROPHY_ENDPOINT . 'trophyTitles/%s', $this->npCommunicationId), $data);

            if ($game->totalResults !== 1 || !count($game->trophyTitles)) return null;

            $this->game = $game->trophyTitles[0];
        }

        return $this->game;
    }
458114
public function getTitle()
    {
        $title = array();
        $row = $this->getPage();
        if (!$row) {
            return null;
        }
        do {
            if ($row->name != '' && $row->name != 'Home') {
                $title[] = $row->name;
            }
        } while ($row = $row->getParentPage());
        return implode(' - ', $title);
    }
108511
public function majRankCup()
    {
        $this->majGameRank();
        $teams = $this->findBy(array(), array('gameRank0' => 'DESC', 'gameRank1' => 'DESC', 'gameRank2' => 'DESC', 'gameRank3' => 'DESC'));

        $list = array();
        foreach ($teams as $team) {
            $list[] = $team;
        }

        Ranking::addObjectRank($list, 'rankCup', array('gameRank0', 'gameRank1', 'gameRank2', 'gameRank3'));
        $this->getEntityManager()->flush();
    }
742688
public function getAchievementByName($achievementName)
    {
        /** @var Achievement $achievement */
        foreach ($this->getAchievements() as $achievement) {
            if ($achievement->getName() == $achievementName) {
                return $achievement;
            }
        }

        return null;
    }
931955
public function getCollation()
	{
		$this->connect();

		$tables = $this->getTableList();

		$this->setQuery('SHOW FULL COLUMNS FROM ' . $tables[0]);
		$array = $this->loadAssocList();

		foreach ($array as $field)
		{
			if (!is_null($field['Collation']))
			{
				return $field['Collation'];
			}
		}

		return null;
	}
164227
public function getPrizeCategoryForm()
    {
        if (! $this->prizeCategoryForm) {
            $this->setPrizeCategoryForm(
                $this->getServiceLocator()->get('playgroundgame_prizecategoryuser_form')
            );
        }

        return $this->prizeCategoryForm;
    }
854583
public function getRoleName ()
		{
			$auth = Yii::$app->getAuthManager();
			$roles = $auth->getRolesByUser($this->id);
			$role = current($roles);

			return $role ? $role->name : null;
		}
684068
public function getAllSlotsDivided()
    {
        $return = array('radiant' => array(), 'dire' => array());
        foreach ($this->_slots as $slot) {
            $team = 'radiant';
            if ($slot->get('player_slot') > 5) {
                $team = 'dire';
            }
            array_push($return[$team], $slot);
        }
        return $return;
    }
29243
public function get()
    {
        foreach ($this->_strategies as $strategy) {
            $result = $strategy->get();
            if ($result !== null) {
                return $result;
            }
        }

        return null;
    }
586364
public function load()
    {
        $request = new request(self::STEAM_MATCH_URL, array('match_id' => $this->getMatchId()));
        $matchInfo = $request->send();
        if (null === $matchInfo) {
            return null;
        }
        $match = new Match();
        $players = array();
        foreach ($matchInfo->players->player as $key => $player) {
            $players[] = $player;
        }
        $data = (array)$matchInfo;
        unset($data['players']);
        $data['start_time'] = date('Y-m-d H:i:s', $data['start_time']);
        $data['radiant_win'] = ($data['radiant_win'] === 'true') ? '1' : '0';
        $match->setArray($data);
        // slots info
        foreach ($players as $player) {
            $data = (array)$player;
            $data['match_id'] = $this->getMatchId();
            $slot = new Slot();
            $slot->setArray($data);
            // additional_units
            if (array_key_exists('additional_units', $data)) {
                $slot->setAdditionalUnitItems((array)($data['additional_units']->unit));
            }
            // abilities
            if (array_key_exists('ability_upgrades', $data)) {
                $d = (array)$data['ability_upgrades'];
                $abilitiesUpgrade = $d['ability'];
                if (!is_array($abilitiesUpgrade)) {
                    $abilitiesUpgrade = array($abilitiesUpgrade);
                }
                foreach ($abilitiesUpgrade as $k => $v) {
                    $abilitiesUpgrade[$k] = (array)$abilitiesUpgrade[$k];
                }
                $slot->setAbilitiesUpgrade($abilitiesUpgrade);
            }
            $match->addSlot($slot);
        }
        if (isset($matchInfo->picks_bans)) {
            $picksBans = (array)$matchInfo->picks_bans;
            foreach ($picksBans['pick_ban'] as $k => $v) {
                $picksBans['pick_ban'][$k] = (array)$v;
                $picksBans['pick_ban'][$k]['is_pick'] = filter_var($picksBans['pick_ban'][$k]['is_pick'], FILTER_VALIDATE_BOOLEAN) ? '1' : '0';
            }
            $match->setAllPickBans($picksBans['pick_ban']);
        }
        return $match;
    }
940717
public function getResults()
    {
        return ! is_null($this->parent->{$this->parentKey})
                ? $this->get()
                : $this->related->newCollection();
    }
1254369
public function getPrevious()
    {
        $pos = $this->getPosition();
        if ($pos == 0) {
            return null;
        } else {
            $this->getInternalIterator()->seek($pos - 1);

            return $this->getCurrent();
        }
    }
14069
public function retrieveGameModeStats ()
    {
        $data = file_get_contents("http://battlefield.play4free.com/en/profile/stats/" .$this->_profileID. "/" .$this->_soldierID. "?g=[%22GameModeStats%22]");
        $gameModeStats = json_decode($data);
        return $gameModeStats;
    }
865363
public function getLast()
    {
        $count = $this->count();
        if ($count == 0) {
            return null;
        } else {
            $this->getInternalIterator()->seek($count - 1);

            return $this->getCurrent();
        }
    }
1246917
public function getPrevSibling()
	{
		$right = $this->getLeftValue() - 1;
		if ($right <= 0) {
			return null;
		}
		$searchCondition = $this->repository->createSearchCondition()
				->rightEqualsTo($right);

		$prevSibling = $this->repository->search($searchCondition);
		if ( ! isset($prevSibling[0])) {
			return null;
		}
		$prevSibling = $prevSibling[0];
		
		return $prevSibling;
	}
949852
public function get_course() {
        global $DB;

        if ($this->course) {
            return $this->course;
        }

        if (!$this->context) {
            return null;
        }
        $params = array('id' => $this->get_course_context()->instanceid);
        $this->course = $DB->get_record('course', $params, '*', MUST_EXIST);

        return $this->course;
    }
525678
public function get_data() {
        $data = parent::get_data();
        if (!empty($data->saveguide)) {
            $data->status = gradingform_controller::DEFINITION_STATUS_READY;
        } else if (!empty($data->saveguidedraft)) {
            $data->status = gradingform_controller::DEFINITION_STATUS_DRAFT;
        }
        return $data;
    }