Get tracks from the queue.

@param int $start The zero-based position in the queue to start from
@param int $total The maximum number of tracks to return

@return TrackInterface[]
186351
public function getTracks(int $start = 0, int $total = 0): array
    {
        $tracks = [];

        if ($total > 0 && $total < 100) {
            $limit = $total;
        } else {
            $limit = 100;
        }

        do {
            $data = $this->browse("DirectChildren", $start, $limit);
            $parser = new XmlParser($data["Result"]);
            foreach ($parser->getTags("item") as $item) {
                $tracks[] = $this->trackFactory->createFromXml($item);
                if ($total > 0 && count($tracks) >= $total) {
                    return $tracks;
                }
            }

            $start += $limit;
        } while ($data["NumberReturned"] && $data["TotalMatches"] && count($tracks) < $data["TotalMatches"]);

        return $tracks;
    }
731517
def getTracksInCollection(user=nil,start=nil,count=nil,sort=nil,query=nil,extras=nil)
      method = 'getTracksInCollection'
      type = Track
      args = {}
      args[:user] = user if user
      args[:start] = start if start
      args[:count] = count if count
      args[:sort] = sort if sort
      args[:query] = query if query
      args[:extras] = extras if extras
      return_object type,method,args
    end
1083505
private static function getMigrationScripts(int $start, int $end, array $skip)
    {
        return MigrationsManager::getMigrationsManager()->getMigrationScripts(
            $start,
            $end,
            $skip
        );
    }
693297
public static function to_assoc($start = 1)
	{
		$segments = array_slice(static::segments(), ($start - 1));
		count($segments) % 2 and $segments[] = null;

		return \Arr::to_assoc($segments);
	}
476006
public function getTasks($tasks, $throwException = false)
    {
        $data = $this->query($throwException);

        $ret = [];
        foreach ($tasks as $task) {
            $ret[$task->getId()] = $this->formatTask($task, $data);
        }

        return $ret;
    }
1082320
public function trailStarted($started = null)
    {
        if ($started === null) {
            return $this->trail_started;
        } else {
            $this->trail_started = $started;
            return $this;
        }
    }
270066
public function selectByRank(int $start = 0, int $stop = -1, bool $desc = false): array
    {
        //按降序获取
        if ($desc) {
            return $this->handle->zRevRange($this->name, $start, $stop, true);
        }

        //按升序获取
        return $this->handle->zRange($this->name, $start, $stop, true);
    }
320398
public function getAllTracks()
    {
        $cacheId = __CLASS__ . '_' . __FUNCTION__;

        if ($results = $this->cache->load($cacheId)) {
            return $results;
        }

        $select = "SELECT gtr_id_track, gtr_track_name
                    FROM gems__tracks
                    WHERE gtr_track_class != 'SingleSurveyEngine'
                    ORDER BY gtr_track_name";

        $results = $this->db->fetchPairs($select);
        $this->cache->save($results, $cacheId, array('tracks'));
        return $results;
    }
1057625
def get_top_tracks(self, limit=None, cacheable=True):
        """"""

        params = {}
        if limit:
            params["limit"] = limit

        doc = _Request(self, "chart.getTopTracks", params).execute(cacheable)

        seq = []
        for node in doc.getElementsByTagName("track"):
            title = _extract(node, "name")
            artist = _extract(node, "name", 1)
            track = Track(artist, title, self)
            weight = _number(_extract(node, "playcount"))
            seq.append(TopItem(track, weight))

        return seq
1236106
public function getRangeUrls($start,$end){

        $urls = Array();

        if($end > $this->totalPages){
            $end = $this->totalPages;
        }//if

        if($start < 1){
            $start = 1;
        }//if

        for($i = $start; $i <= $end; $i++){
            $urls[] = $this->getPageUrl($i);
        }//for

        return $urls;
       
    }
1233246
public function select(int $start, int $stop): array
    {
        return $this->handle->lRange($this->name, intval($start), intval($stop));
    }
860309
protected function _getLocation($traces)
    {
        for ($i = count($traces) - 1; $i >= 0; $i--) {
            $trace = $traces[$i];
            if ($trace['function'] === '__call' || in_array($trace['function'], self::$_levels, true)) {
                return $trace;
            }
        }

        return [];
    }
1101595
public static function getTotals()
    {
        $totals = array();
        $lastLog = end(self::$stackLog);
        foreach (array('time', 'realmem' /* , 'emalloc' */) as $metric) {
            $totals[$metric] = $lastLog[$metric . '_end'] - self::$startValues[$metric];
        }
        return $totals;
    }
310131
public function counting($name, $hit, $total = null)
    {
        if (! \is_string($name) || empty($name)) {
            return;
        }

        $cid = Coroutine::tid();
        if (! isset($this->countings[$cid][$name])) {
            $this->countings[$cid][$name] = ['hit' => 0, 'total' => 0];
        }
        $this->countings[$cid][$name]['hit'] += (int)$hit;
        if ($total !== null) {
            $this->countings[$cid][$name]['total'] += (int)$total;
        }
    }
19057
public function getCurrentPage($total = null)
	{
		if (is_null($total))
		{
			return $this->currentPage;
		}
		else
		{
			return min($this->currentPage, (int) ceil($total / $this->perPage));
		}
	}
1015157
protected function getDevicesFromSessions(Carbon $start, Carbon $end)
    {
        return $this->getVisitorsFilteredByDateRange($start, $end)
            ->filter(function (Visitor $session) {
                return $session->hasDevice();
            })
            ->transform(function (Visitor $session) {
                return $session->device;
            })
            ->groupBy('kind')
            ->transform(function (Collection $items, $key) {
                return [
                    'kind'  => trans("tracker::devices.kinds.$key"),
                    'count' => $items->count(),
                ];
            });
    }
872203
public function total_pages( $limit = null, $offset = null, $total = null ) {

		$this->do_hook( 'total_pages' );

		if ( null === $limit ) {
			$limit = $this->limit;
		}

		if ( null === $offset ) {
			$offset = $this->offset;
		}

		if ( null === $total ) {
			$total = $this->total_found();
		}

		return ceil( ( $total - $offset ) / $limit );

	}