Get the top tags chart
@param array $methodVars An array with the optional value: <i>limit</i>, <i>page</i>
@return array|false
199327
public function getTopTags($methodVars)
    {
        $vars = array(
            'method' => 'chart.gettoptags',
            'api_key' => $this->auth->apiKey
        );
        $vars = array_merge($vars, $methodVars);

        if ($call = $this->apiGetCall($vars)) {
            $i = 0;
            foreach ($call->tags->tag as $tags) {
                $topTags[$i]['name'] = (string) $tags->name;
                $topTags[$i]['playcount'] = (string) $tags->playcount;
                $topTags[$i]['listeners'] = (string) $tags->listeners;
                $topTags[$i]['mbid'] = (string) $tags->mbid;
                $topTags[$i]['url'] = (string) $tags->url;
                $topTags[$i]['streamable'] = (string) $tags->streamable;
                $topTags[$i]['image']['small'] = (string) $tags->image[0];
                $topTags[$i]['image']['medium'] = (string) $tags->image[1];
                $topTags[$i]['image']['large'] = (string) $tags->image[2];
                $topTags[$i]['image']['extralarge'] = (string) $tags->image[3];
                $topTags[$i]['image']['mega'] = (string) $tags->image[4];
                $i++;
            }

            return $topTags;
        } else {
            return false;
        }
    }
800034
public function parse(array $vars = [])
    {
        $this->engine->parse($this->string);

        return $this->engine->getAsHtml();
    }
292923
public function getMethodAnnotationsForMatchingTag($tag, $methodName = null) {
        if ($methodName) {
            return isset($this->methodAnnotations[$methodName][$tag]) ? $this->methodAnnotations[$methodName][$tag] : array();
        } else {
            $matchingAnnotations = array();
            foreach ($this->getMethodAnnotations() as $method => $methodAnnotations) {
                if (isset($methodAnnotations[$tag])) {
                    $matchingAnnotations[$method] = $methodAnnotations[$tag];
                }
            }

            return $matchingAnnotations;
        }
    }
882634
public function getInfo($methodVars = Array())
    {
        // Only allow full authed calls
        if ($this->fullAuth == true) {
            $vars = array(
                'method' => 'user.getinfo',
                'api_key' => $this->auth->apiKey,
                'sk' => $this->auth->sessionKey
            );
            $vars = array_merge($vars, $methodVars);
            $apiSig = $this->apiSig($this->auth->apiSecret, $vars);
            $vars['api_sig'] = $apiSig;

            if ($call = $this->apiGetCall($vars)) {
                $info['name'] = (string) $call->user->name;
                $info['realname'] = (string) $call->user->realname;
                $info['url'] = (string) $call->user->url;
                $info['image'] = (string) $call->user->image;
                $info['lang'] = (string) $call->user->lang;
                $info['country'] = (string) $call->user->country;
                $info['age'] = (string) $call->user->age;
                $info['gender'] = (string) $call->user->gender;
                $info['subscriber'] = (string) $call->user->subscriber;
                $info['playcount'] = (string) $call->user->playcount;
                $info['playlists'] = (string) $call->user->playlists;

                return $info;
            } else {
                return false;
            }
        } else {
            throw new NotAuthenticatedException('Method requires full auth. Call auth.getSession using lastfmApiAuth class');
        }
    }
1239684
public function getRecentTracks($methodVars)
    {
        // Check for required variables
        if (!empty($methodVars['user'])) {
            $vars = array(
                'method' => 'user.getrecenttracks',
                'api_key' => $this->auth->apiKey
            );
            $vars = array_merge($vars, $methodVars);

            if ($call = $this->apiGetCall($vars)) {
                if (count($call->recenttracks->track) > 0) {
                    $i = 0;
                    foreach ($call->recenttracks->track as $track) {
                        $recentTracks[$i]['name'] = (string) $track->name;
                        if (isset($track['nowplaying'])) {
                            $recentTracks[$i]['nowplaying'] = true;
                        }
                        $recentTracks[$i]['mbid'] = (string) $track->mbid;
                        $recentTracks[$i]['url'] = (string) $track->url;
                        $recentTracks[$i]['date'] = (string) $track->date['uts'];
                        $recentTracks[$i]['streamable'] = (string) $track->streamable;
                        $recentTracks[$i]['artist']['name'] = (string) $track->artist;
                        $recentTracks[$i]['artist']['mbid'] = (string) $track->artist['mbid'];
                        $recentTracks[$i]['album']['name'] = (string) $track->album;
                        $recentTracks[$i]['album']['mbid'] = (string) $track->album['mbid'];
                        $recentTracks[$i]['images']['small'] = (string) $track->image[0];
                        $recentTracks[$i]['images']['medium'] = (string) $track->image[1];
                        $recentTracks[$i]['images']['large'] = (string) $track->image[2];
                        $i++;
                    }

                    return $recentTracks;
                } else {
                    throw new NoResultsException('This user has no recent tracks');
                }
            } else {
                return false;
            }
        } else {
            throw new InvalidArgumentException('You must include artist variable in the call for this method');
        }
    }
250512
public function getTopArtists($methodVars)
    {
        // Check for required variables
        if (!empty($methodVars['tag'])) {
            $vars = array(
                'method' => 'tag.gettopartists',
                'api_key' => $this->auth->apiKey
            );
            $vars = array_merge($vars, $methodVars);

            if ($call = $this->apiGetCall($vars)) {
                $i = 0;
                foreach ($call->topartists->artist as $artist) {
                    $topArtists[$i]['name'] = (string) $artist->name;
                    $topArtists[$i]['tagcount'] = (string) $artist->tagcount;
                    $topArtists[$i]['url'] = (string) $artist->url;
                    $topArtists[$i]['mbid'] = (string) $artist->mbid;
                    $topArtists[$i]['streamable'] = (string) $artist->streamable;
                    $topArtists[$i]['image']['small'] = (string) $artist->image[0];
                    $topArtists[$i]['image']['medium'] = (string) $artist->image[1];
                    $topArtists[$i]['image']['large'] = (string) $artist->image[2];
                    $i++;
                }
                return $topArtists;
            } else {
                return false;
            }
        } else {
            throw new InvalidArgumentException('You must include tag variable in the call for this method');
        }
    }
189093
public function getTracks($methodVars)
    {
        // Check for required variables
        if (!empty($methodVars['user'])) {
            $vars = array(
                'method' => 'library.gettracks',
                'api_key' => $this->auth->apiKey
            );
            $vars = array_merge($vars, $methodVars);

            if ($call = $this->apiGetCall($vars)) {
                $tracks['page'] = (string) $call->tracks['page'];
                $tracks['perPage'] = (string) $call->tracks['perPage'];
                $tracks['totalPages'] = (string) $call->tracks['totalPages'];
                $i = 0;
                foreach ($call->tracks->track as $track) {
                    $tracks['results'][$i]['name'] = (string) $track->name;
                    // THIS DOESN'T WORK AS DOCUMENTED  --- $tracks['results'][$i]['rank'] = (string) $track['rank'];
                    $tracks['results'][$i]['playcount'] = (string) $track->playcount;
                    $tracks['results'][$i]['tagcount'] = (string) $track->tagcount;
                    $tracks['results'][$i]['url'] = (string) $track->url;
                    $tracks['results'][$i]['streamable'] = (string) $track->streamable;
                    $tracks['results'][$i]['fulltrack'] = (string) $track->streamable['fulltrack'];
                    $tracks['results'][$i]['artist']['name'] = (string) $track->artist->name;
                    $tracks['results'][$i]['artist']['mbid'] = (string) $track->artist->mbid;
                    $tracks['results'][$i]['artist']['url'] = (string) $track->artist->url;
                    $tracks['results'][$i]['image']['small'] = (string) $track->image[0];
                    $tracks['results'][$i]['image']['medium'] = (string) $track->image[1];
                    $tracks['results'][$i]['image']['large'] = (string) $track->image[2];
                    $i++;
                }
                return $tracks;
            } else {
                return false;
            }
        } else {
            throw new InvalidArgumentException('You must include a user variable in the call for this method');
        }
    }
663994
private function automate($viewVars)
    {
        $rawDataObj = new \stdClass();
        foreach ($viewVars as $key => $var) {
            $rawDataObj->$key = $var;
            $viewVars[$key]   = $this->escape($var);
        }
        $viewVars['raws'] = $rawDataObj;

        return $viewVars;
    }
880758
public function getMethod(string $methodName, $tags = '*'): array
    {
        try {
            $method = new ReflectionMethod($this->className, $methodName);
        } catch (ReflectionException $e) {
            return [];
        }

        return $this->parse($method->getDocComment(), $tags);
    }
617330
private function getMethodsContainsVariable(array $methods, $variableName)
    {
        $methodsWithVariable = [];

        foreach ($methods as $method) {
            $propertyPostfixes = $method->findChildrenOfType('PropertyPostfix');

            /** @var AbstractNode $propertyPostfix */
            foreach ($propertyPostfixes as $propertyPostfix) {
                $identifier = $propertyPostfix->getFirstChildOfType('Identifier');

                if (null === $identifier) {
                    continue;
                }

                if ($variableName === $identifier->getName()) {
                    $methodsWithVariable[] = $method;

                    break;
                }
            }
        }

        return $methodsWithVariable;
    }
1321925
public function search($methodVars)
    {
        // Check for required variables
        if (!empty($methodVars['tag'])) {
            $vars = array(
                'method' => 'tag.search',
                'api_key' => $this->auth->apiKey
            );
            $vars = array_merge($vars, $methodVars);

            if ($call = $this->apiGetCall($vars)) {
                $opensearch = $call->results->children('http://a9.com/-/spec/opensearch/1.1/');
                if ($opensearch->totalResults > 0) {
                    $searchResults['totalResults'] = (string) $opensearch->totalResults;
                    $searchResults['startIndex'] = (string) $opensearch->startIndex;
                    $searchResults['itemsPerPage'] = (string) $opensearch->itemsPerPage;
                    $i = 0;
                    foreach ($call->results->tagmatches->tag as $tag) {
                        $searchResults['results'][$i]['name'] = (string) $tag->name;
                        $searchResults['results'][$i]['count'] = (string) $tag->count;
                        $searchResults['results'][$i]['url'] = (string) $tag->url;
                        $i++;
                    }
                    return $searchResults;
                } else {
                    throw new NoResultsException('No results');
                }
            } else {
                return false;
            }
        } else {
            throw new InvalidArgumentException('You must include tag variable in the call for this method');
        }
    }
512162
public static function getRelative($flags = 0x000000, Array $queryVars = array()) {
    $flags |= self::RELATIVE;
    return self::getURL(NULL,$flags, $queryVars);
  }
1353354
public function getTopKeyWordsWithoutHits(int $rootPageId, int $days = 30, int $limit = 10) : array
    {
        return $this->getTopKeyWordsWithOrWithoutHits($rootPageId, $days, $limit, true);
    }
907696
public function row($vars = '', $cells = '')
    {
        $html = $this->wrapUp('row')."\n\t";
        $this->body = true;
        $this->vars = (!empty($cells)) ? $this->values($cells) : array();

        return $html.$this->page->tag('tr', $this->values($vars));
    }
369332
public function getMostVisitedPages($numberOfDays = 365, $maxResults = 20)
    {
        list($startDate, $endDate) = $this->calculateNumberOfDays($numberOfDays);

        return $this->getMostVisitedPagesForPeriod($startDate, $endDate, $maxResults);
    }
1373832
private function inspectParsedMethods( $countCalls = FALSE )
	{
		foreach( $this->methods as $method => $data )												//  iterate before parsed methods
		{
			foreach( $data['lines'] as $nr => $line )												//  iterate method/function lines
			{
				$pattern	= "@^ *\t*[$]([a-z0-9_]+)(\t| )+=[^>].*@i";								//  prepare regular expression for variable assignment
				if( preg_match( $pattern, $line ) )													//  line contains variable assignment
					if( $var = trim( preg_replace( $pattern, "\\1", $line ) ) )						//  extract variable name from line
						if( !array_key_exists( $var, $this->methods[$method]['variables'] ) )		//  variable is not noted, yet
							$this->methods[$method]['variables'][$var]	= 0;						//  note newly found variable
				foreach( $this->methods[$method]['variables'] as $name => $count )					//  iterate known method/function variables
				{
					if( !$countCalls && $count )													//  variable is used and count mode is off
						continue;																	//  skip to next line
					if( preg_match( "/\(/", $name ) || preg_match( "/\)/", $name ) )
						xmp( $method."::".$name.' ('.join( ",", array_keys( $this->methods ) ).')' );
					$line		= preg_replace( "/\$".addslashes( $name )."\s*=/", "", $line );					//  remove variable assignment if found
					if( preg_match( '@\$'.addslashes( $name ).'[^a-z0-9_]@i', $line ) ){							//  if variable is used in this line
						$this->methods[$method]['variables'][$name]++;								//  increate variable's use counter
					}
				}
			}
		}
	}
670252
public function viewVars($viewVars = null)
    {
        if ($viewVars === null) {
            return $this->_viewVars;
        }
        $this->_viewVars = array_merge($this->_viewVars, (array)$viewVars);

        return $this;
    }