@param string      $champion_id
@param string      $locale
@param string|null $version

@return array
@throws ArgumentException
@throws SettingsException

@see getStaticChampion
12788
public static function getStaticChampionById( string $champion_id, string $locale = 'en_US', string $version = null ) : array
	{
		$data = self::getStaticChampions($locale, $version);
		if (isset($data['data'][$champion_id]) == false)
			throw new ArgumentException('Champion with given ID was not found.', 404);

		return $data['data'][$champion_id];
	}
665409
public function getStaticMastery( int $mastery_id, string $locale = 'en_US', string $version = null ): StaticData\StaticMasteryDto
	{
		$result = false;
		try
		{
			// Fetch StaticData from JSON files
			$result = DataDragonAPI::getStaticMastery($mastery_id, $locale, $version);
			if (!$result) throw new ServerException("StaticData failed to be loaded.");

			$this->result_data = $result;
		}
		catch (DataDragonExceptions\SettingsException $ex)
		{
			throw new SettingsException("DataDragon API was not initialized properly! StaticData endpoints cannot be used.");
		}
		catch (DataDragonExceptions\ArgumentException $ex)
		{
			throw new RequestException($ex->getMessage(), $ex->getCode());
		}
		finally
		{
			// Parse array and create instances
			return new StaticData\StaticMasteryDto($result, $this);
		}
	}
403479
private function getIndexQueryBuilder($locale, array $filterFormData = null)
    {
        $qb = $this->getEntityManager()->getRepository($this->entityClass)->createQueryBuilder('o');

        foreach ($this->configuration['joins'] as $alias => $join) {
            if (false === strpos($join, '.')) {
                $join = 'o.'.$join;
            }

            $qb->addSelect($alias)->leftJoin($join, $alias);
        }

        $translationJoiner = $this->getTranslationJoiner();

        if ($translationJoiner->isTranslatable($this->entityClass)) {
            $translationJoiner->joinTranslation($qb, true, $locale);
        }
        if (empty($filterFormData)) {
            return $qb;
        }

        $filtererOptions = ['non_strict_comparison_fields' => []];
        $getNonStrictComparisonFields = function (array $fields) use (&$filtererOptions) {
            foreach ($fields as $field => $attr) {
                if (!$attr['compare_strict']) {
                    $filtererOptions['non_strict_comparison_fields'][] = $field;
                }
            }
        };
        $getNonStrictComparisonFields($this->configuration['form']['filter']['fields']);
        array_map($getNonStrictComparisonFields, $this->configuration['form']['filter']['field_groups']);

        $this->getFilterer()->filter($qb, $filterFormData, $filtererOptions);

        return $qb;
    }
987569
public static function getStaticSummonerSpellById( string $summonerspell_id, string $locale = 'en_US', string $version = null ) : array
	{
		$data = self::getStaticSummonerSpellsWithKeys($locale, $version);
		if (isset($data['data'][$summonerspell_id]) == false)
			throw new ArgumentException('Summoner spell with given ID was not found.', 404);

		return $data['data'][$summonerspell_id];
	}
178310
public static function getStaticSummonerSpells( string $locale = 'en_US', string $version = null ) : array
	{
		$url = self::getStaticDataFileUrl(self::STATIC_SUMMONERSPELLS, null, $locale, $version);
		return self::loadStaticData($url, [DataDragonAPI::class, "_summonerSpell"]);
	}
304928
public static function getStaticRune( int $rune_id, string $locale = 'en_US', string $version = null) : array
	{
		$data = self::getStaticRunes($locale, $version);
		if (isset($data['data'][$rune_id]) == false)
			throw new ArgumentException('Rune with given ID was not found.', 404);

		return $data['data'][$rune_id];
	}
254138
protected function getFileVersion($id, $version)
    {
        /** @var MediaInterface $mediaEntity */
        $mediaEntity = $this->container->get('sulu.repository.media')->findMediaById($id);

        if (!$mediaEntity) {
            return null;
        }

        $file = $mediaEntity->getFiles()[0];

        if (!$file) {
            return null;
        }

        if (!$version) {
            $version = $mediaEntity->getFiles()[0]->getVersion();
        }

        $fileVersion = $file->getFileVersion((int) $version);

        if (!$fileVersion) {
            throw new FileVersionNotFoundException($id, $version);
        }

        return $fileVersion;
    }
1009773
public static function init($locale, $environment, $version)
    {
        $envFilename = Registry::get('applicationPath') . '/.env';
        if (file_exists($envFilename)) {
            $env = Ini::parse($envFilename, true, $locale . '-' . $environment . '-' . $version, 'common', false);
            $env = self::mergeEnvVariables($env);
        } else {
            $env = new \StdClass();
        }
        self::$data = Ini::bindArrayToObject($env);
    }
1108241
public static function getChampionIconO( StaticChampionDto $champion, array $attributes = [] ): Html
	{
		return self::getChampionIcon($champion->id, $attributes);
	}
921977
public static function getChampionLoadingUrl( string $champion_name, int $skin = 0 ): string
	{
		return self::getSetting(self::SET_ENDPOINT) . "img/champion/loading/{$champion_name}_{$skin}.jpg";
	}
753763
public static function getByLocale($locale)
    {
        if (!$locale) {
            return null;
        }

        if ($locale instanceof Locale) {
            return $locale;
        }

        if (!static::$locales_by_title) {
            static::$locales_by_title = [];
            foreach (Locale::getCached() as $localeObj) {
                static::$locales_by_title[$localeObj->Locale] = $localeObj;
            }
        }

        // Get filtered locale
        return isset(static::$locales_by_title[$locale]) ? static::$locales_by_title[$locale] : null;
    }
914324
public static function getChampionSplashO( StaticChampionDto $champion, int $skin = 0, array $attributes = [] ): Html
	{
		return self::getChampionSplash($champion->id, $skin, $attributes);
	}
741162
public static function getStaticLanguageStrings( string $locale = 'en_US', string $version = null ) : array
	{
		$url = self::getStaticDataFileUrl(self::STATIC_LANGUAGESTRINGS, null, $locale, $version);
		return self::loadStaticData($url);
	}
1345358
public function _get($name, $locale=null) {
		$name = strtolower($name);
		
		if(!$locale)
			$locale = $this->getLocale();

		if($this->getDefinition()->hasProperty($name)) {
			if($this->getDefinition()->property($name)->get('i18n') && $locale !== $this->getLocale()) {
				#multiple locales at once
				if(is_array($locale)) {
					$res = [];
					foreach($locale as $locale)
						$res[$locale] = $this->get($name, $locale);
					return $res;
				}
				elseif(isset($this->data['translations'][$locale][$name]))
					return $this->data['translations'][$locale][$name];
				else {
					$this->getDefinition()->trigger('getTranslations', [$this, $name, $locale]);
					if(!isset($this->data['translations'][$locale][$name]))
						return null;
					return $this->data['translations'][$locale][$name];
				}
			}
			elseif(isset($this->data['properties'][$name]))
				return $this->data['properties'][$name];
		}
		elseif(isset($this->data[$name]))
			return $this->data[$name];
	}
1097861
public static function getChampionSplashUrl( string $champion_name, int $skin = 0 ): string
	{
		return self::getSetting(self::SET_ENDPOINT) . "img/champion/splash/{$champion_name}_{$skin}.jpg";
	}
1052134
public function champion($championId)
	{
		if ( ! isset($this->info['champions'][$championId]))
		{
			return null;
		}

		return $this->info['champions'][$championId];
	}
848878
public static function get_record_count_by_contextlevel($contextlevel = null, $status = false) {
        global $DB;

        $sql = "SELECT COUNT(1)
                  FROM {" . self::TABLE . "} expiredctx
                  JOIN {context} ctx
                    ON ctx.id = expiredctx.contextid";

        $conditions = [];
        $params = [];

        if (!empty($contextlevel)) {
            $conditions[] = "ctx.contextlevel = :contextlevel";
            $params['contextlevel'] = intval($contextlevel);
        }

        if ($status !== false) {
            $sql .= " AND expiredctx.status = :status";
            $params['status'] = intval($status);
        }
        if (!empty($conditions)) {
            $sql .= ' WHERE ' . implode(' AND ', $conditions);
        }

        return $DB->count_records_sql($sql, $params);
    }