Parse the params into an array.

@param mixed $rankedQueues
@param mixed $seasons
@param mixed $championIds
@param mixed $beginIndex
@param mixed $endIndex
@param mixed $beginTime
@param mixed $endTime
@return array
976599
protected function parseParams($rankedQueues = null, $seasons = null, $championIds = null, $beginIndex = null, $endIndex = null, $beginTime = null, $endTime = null)
	{
		$params = [];

		if (isset($rankedQueues))
		{
			if (is_array($rankedQueues))
			{
				$params['rankedQueues'] = implode(',', $rankedQueues);
			}
			else
			{
				$params['rankedQueues'] = $rankedQueues;
			}
		}
		if (isset($seasons))
		{
			if (is_array($seasons))
			{
				$params['seasons'] = implode(',', $seasons);
			}
			else
			{
				$params['seasons'] = $seasons;
			}
		}

		if (isset($championIds))
		{
			if (is_array($championIds))
			{
				$params['championIds'] = implode(',', $championIds);
			}
			else
			{
				$params['championIds'] = $championIds;
			}
		}

		if (isset($beginIndex))
		{
			$params['beginIndex'] = $beginIndex;
		}
		if (isset($endIndex))
		{
			$params['endIndex'] = $endIndex;
		}
		if (isset($beginTime))
		{
			$params['beginTime'] = $beginTime;
		}
		if (isset($endTime))
		{
			$params['endTime'] = $endTime;
		}

		return $params;
	}
1122341
private Set<String> parseInstanceStates(final Map<String, String[]> queryParams) {
        Set<String> instanceStates = new TreeSet<String>();

        for (String queryKey : queryParams.keySet()) {
            // e.g. Filter.1.Value.1: running, Filter.1.Value.2: pending
            if (queryKey.startsWith("Filter.1.Value")) {
                for (String state : queryParams.get(queryKey)) {
                    instanceStates.add(state);
                }
            }
        }
        return instanceStates;
    }
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];
	}
75127
public function fromArray(array $options)
    {
        if (isset($options['Id'])) {
            Validate::isString($options['Id'], 'options[Id]');
            $this->_id = $options['Id'];
        }

        if (isset($options['Name'])) {
            Validate::isString($options['Name'], 'options[Name]');
            $this->_name = $options['Name'];
        }

        if (isset($options['Created'])) {
            Validate::isDateString($options['Created'], 'options[Created]');
            $this->_created = new \DateTime($options['Created']);
        }

        if (isset($options['LastModified'])) {
            Validate::isDateString(
                $options['LastModified'],
                'options[LastModified]'
            );
            $this->_lastModified = new \DateTime($options['LastModified']);
        }

        if (isset($options['EndTime'])) {
            Validate::isDateString($options['EndTime'], 'options[EndTime]');
            $this->_endTime = new \DateTime($options['EndTime']);
        }

        if (isset($options['Priority'])) {
            Validate::isInteger($options['Priority'], 'options[Priority]');
            $this->_priority = $options['Priority'];
        }

        if (isset($options['RunningDuration'])) {
            Validate::isDouble(
                $options['RunningDuration'],
                'options[RunningDuration]'
            );
            $this->_runningDuration = $options['RunningDuration'];
        }

        if (isset($options['StartTime'])) {
            Validate::isDateString($options['StartTime'], 'options[StartTime]');
            $this->_startTime = new \DateTime($options['StartTime']);
        }

        if (isset($options['State'])) {
            Validate::isInteger($options['State'], 'options[State]');
            $this->_state = $options['State'];
        }

        if (isset($options['TemplateId'])) {
            Validate::isString($options['TemplateId'], 'options[TemplateId]');
            $this->_templateId = $options['TemplateId'];
        }
    }
1088894
public function getChampion($championId, $data = null)
	{
		$params = $this->setUpParams('champion', $championId, $data, 'champData', 'champData');
		$array  = $this->makeRequest('champion', $championId, $params);

		if ($this->appendId($championId))
		{
			return new staticChampion($array);
		}
		else
		{
			return new ChampionList($array);
		}
	}
1052134
public function champion($championId)
	{
		if ( ! isset($this->info['champions'][$championId]))
		{
			return null;
		}

		return $this->info['champions'][$championId];
	}
746010
function _parse()
    {
        $this->serviceList = array();

        $services = $this->parser->evalXPath('xrd:Service', $this->xrdNode);

        foreach ($services as $node) {
            $s = new Auth_Yadis_Service();
            $s->element = $node;
            $s->parser = $this->parser;

            $priority = $s->getPriority();

            if ($priority === null) {
                $priority = SERVICES_YADIS_MAX_PRIORITY;
            }

            $this->_addService($priority, $s);
        }
    }
1249374
public function postBulkRequest(array $requests, $guestSpaceId = null): array
    {
        $options = ['json' => ['requests' => $requests]];

        /** @var JsonStream $stream */
        $stream = $this->client
            ->post(self::generateUrl('bulkRequest.json', $guestSpaceId), $options)
            ->getBody();

        return $stream->jsonSerialize()['results'];
    }
1225797
public function slice(array $array, $begin, $end = null): array
    {
        if ($end === null) {
            $end = count($array);
        } elseif ($end < 0) {
            $end = count($array) + $end;
        }
        $length = $end - $begin;
        return array_slice($array, $begin, $length);
    }
1219688
public function masteryPages($identities)
	{
		$ids = $this->extractIds($identities);
		$ids = implode(',', $ids);

		$array     = $this->request('summoner/'.$ids.'/masteries');
		$summoners = [];
		foreach ($array as $summonerId => $data)
		{
			$masteryPages = [];
			foreach ($data['pages'] as $info)
			{
				if ( ! isset($info['masteries']))
				{
					// seting the talents to an empty array
					$info['masteries'] = [];
				}

				$masteriesInfo = $info['masteries'];
				unset($info['masteries']);
				$masteryPage = $this->attachStaticDataToDto(new MasteryPage($info));
				// set masterys
				$masteries = [];
				foreach ($masteriesInfo as $mastery)
				{
					$id             = $mastery['id'];
					$mastery        = $this->attachStaticDataToDto(new Mastery($mastery));
					$masteries[$id] = $mastery;
				}
				$masteryPage->masteries = $masteries;
				$masteryPages[]         = $masteryPage;
			}
			$summoners[$summonerId] = $masteryPages;
		}

		$this->attachResponses($identities, $summoners, 'masteryPages');

		if (is_array($identities))
		{
			return $summoners;
		}
		else
		{
			return reset($summoners);
		}
	}
358423
private function parseIncluding($rows)
	{
		$subs       = null;
		$constraint = null;
		foreach ($this->includes as $relationship)
		{
			// Check for array, meaning we have relationship_name => constraint
			if (is_array($relationship))
			{
				list($relationship, $constraint) = $relationship;
			}

			// Parse for nested relationships
			if (strpos($relationship, '.'))
			{
				list($relationship, $subs) = explode('.', $relationship, 2);
			}

			// If we have subs and a constraint, the constraint should apply to the subs, not the intermediate relation
			if (isset($subs) && isset($constraint))
			{
				$subs       = [$subs, $constraint];
				$constraint = null;
			}

			// Get the actual rows
			$rows = $this->$relationship()->seedWithRelation($rows, $relationship, $constraint, $subs);

			// Reset some vars
			$subs       = null;
			$constraint = null;
		}

		return $rows;
	}
670369
public function majRankPointChart()
    {
        $teams = $this->findBy(array(), array('pointChart' => 'DESC'));

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

        Ranking::addObjectRank($list, 'rankPointChart', array('pointChart'));
        $this->getEntityManager()->flush();
    }
226284
public function getClientList($developer = null, $start = 0, $end = 5)
    {
        ValidationUtility::ensureNullOrString('$developer', $developer);

        ValidationUtility::ensureInteger('$start', $start);
        ValidationUtility::ensureNotNegative('$start', $start);

        ValidationUtility::ensureInteger('$end', $end);
        ValidationUtility::ensureNotNegative('$end', $end);

        $queryParams = array(
            'developer' => $developer,
            'start'     => $start,
            'end'       => $end
        );

        return $this->callServiceGetApi(
            '\Authlete\Dto\ClientListResponse::fromJson',
            self::$CLIENT_GET_LIST_API_PATH,
            $queryParams);
    }
1233703
private function parseMh(array $lines, $num, $start, $end)
    {
        return $this->parseSh($lines, $num, $start, $end);
    }
1102246
function parseArgs() {
    var args = Array.prototype.slice.call(arguments);

    var ret = {
        query: args[0],
        params: [],
        options: {},
        callback: undefined,
        endCallback: undefined
    };

    args.shift();

    // If specified, params must be an array
    if (args[0] instanceof Array) {
        ret.params = args[0];
        args.shift();
    }

    // If specified, options must be a non-Function object
    if (! (args[0] instanceof Function)) {
        ret.options = args[0];
        args.shift();
    }

    ret.callback = args[0];
    ret.endCallback = args[1];

    if (ret.query === undefined || ret.callback === undefined) {
        throw new Error('query and callback are required');
    }

    return ret;
}
855327
public function list(int $beginId = 0, int $limit = 50, string $status = 'CHECKING')
    {
        $params = [
            'begin_id' => $beginId,
            'limit' => $limit,
            'status' => $status,
        ];

        return $this->httpPostJson('card/submerchant/batchget', $params);
    }
1093698
private function parseTaxQueryVars() {
        foreach ( get_taxonomies( [ ], 'objects' ) as $t ) {
            if ( $t->query_var && isset( $this->query_vars[$t->query_var] ) ) {
                $encoded = str_replace( ' ', '+', $this->query_vars[$t->query_var] );
                $this->query_vars[$t->query_var] = $encoded;
            }
        }
    }