Gibt die aktuelle relative URL zurück

@param bitmap $flags
@param Array $queryVars
512162
public static function getRelative($flags = 0x000000, Array $queryVars = array()) {
    $flags |= self::RELATIVE;
    return self::getURL(NULL,$flags, $queryVars);
  }
918765
public function hasFlag($flags)
    {
        $mask = $this->getMaskFromFlags($flags);

        return ($this->bitmask & $mask) === $mask;
    }
1309718
public static function replaceQueryParamsInUrl(array $queryParams, $url)
    {
        if (empty($queryParams)) {
            return $url;
        }
        $parsedUrl = self::parseUrl($url);
        $queryString = isset($parsedUrl['query']) ? $parsedUrl['query'] : '';
        foreach ($queryParams as $param => $value) {
            $queryString = self::replaceQueryParam($param, $value, $queryString);
        }
        $parsedUrl['query'] = $queryString;
        return self::buildUrl($parsedUrl);
    }
42484
protected function sqlStatementFlags($buffer_id, $flag_buffer_ids, $decorations)
	{
		$first = false;

		if ($decorations & self::INDENT) {
			echo $this->indent;
			$first = true;
		}

		if ($decorations & self::LABEL) {
			if ($first) {
				$first = false;
			} else {
				echo ' ';
			}
			echo $buffer_id;
			$first = false;
		}

		foreach ($flag_buffer_ids as $flag_buf) {
			if (isset($this->buffers[$flag_buf])) {
				if ($first) {
					$first = false;
				} else {
					echo ' ';
				}
				echo $this->buffers[$flag_buf];
			}
		}

		if ($decorations & self::COMMA) {
			echo ",";
		}
		if ($decorations & self::EOL) {
			echo "\n";
		}
	}
1364400
private static function getFlagsSelect($statement, $flags)
    {
        $flags['querytype'] = 'SELECT';
        $flags['is_select'] = true;

        if (! empty($statement->from)) {
            $flags['select_from'] = true;
        }

        if ($statement->options->has('DISTINCT')) {
            $flags['distinct'] = true;
        }

        if (! empty($statement->group) || ! empty($statement->having)) {
            $flags['is_group'] = true;
        }

        if (! empty($statement->into)
            && ($statement->into->type === 'OUTFILE')
        ) {
            $flags['is_export'] = true;
        }

        $expressions = $statement->expr;
        if (! empty($statement->join)) {
            foreach ($statement->join as $join) {
                $expressions[] = $join->expr;
            }
        }

        foreach ($expressions as $expr) {
            if (! empty($expr->function)) {
                if ($expr->function === 'COUNT') {
                    $flags['is_count'] = true;
                } elseif (in_array($expr->function, static::$FUNCTIONS)) {
                    $flags['is_func'] = true;
                }
            }
            if (! empty($expr->subquery)) {
                $flags['is_subquery'] = true;
            }
        }

        if (! empty($statement->procedure)
            && ($statement->procedure->name === 'ANALYSE')
        ) {
            $flags['is_analyse'] = true;
        }

        if (! empty($statement->group)) {
            $flags['group'] = true;
        }

        if (! empty($statement->having)) {
            $flags['having'] = true;
        }

        if (! empty($statement->union)) {
            $flags['union'] = true;
        }

        if (! empty($statement->join)) {
            $flags['join'] = true;
        }

        return $flags;
    }
589001
public function addFlag($flags)
    {
        $this->bitmask = $this->bitmask | $this->getMaskFromFlags($flags);

        return $this;
    }
524799
public function makeRedirectUri($uri, $params = [], $queryDelimiter = '?')
    {
        $uri .= (strstr($uri, $queryDelimiter) === false) ? $queryDelimiter : '&';

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

            if ($call = $this->apiGetCall($vars)) {
                $callNamespaces = $call->getDocNamespaces(true);
                // fix missing namespace (sic)
                if (!isset($callNamespaces['opensearch'])) {
                    $call->results->addAttribute('xmlns:xmlns:opensearch', 'http://a9.com/-/spec/opensearch/1.1/');
                    $call = new SimpleXMLElement($call->asXML());
                }
                $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->artistmatches->artist as $artist) {
                        $searchResults['results'][$i]['name'] = (string) $artist->name;
                        $searchResults['results'][$i]['mbid'] = (string) $artist->mbid;
                        $searchResults['results'][$i]['url'] = (string) $artist->url;
                        $searchResults['results'][$i]['streamable'] = (string) $artist->streamable;
                        $searchResults['results'][$i]['image']['small'] = (string) $artist->image[0];
                        $searchResults['results'][$i]['image']['medium'] = (string) $artist->image[1];
                        $searchResults['results'][$i]['image']['large'] = (string) $artist->image[2];
                        $searchResults['results'][$i]['image']['extralarge'] = (string) $artist->image[3];
                        $searchResults['results'][$i]['image']['mega'] = (string) $artist->image[4];
                        $i++;
                    }

                    return $searchResults;
                } else {
                    throw new NoResultsException('No results');
                }
            } else {
                return false;
            }
        } else {
            throw new InvalidArgumentException('You must include artist variable in the call for this method');
        }
    }
270122
public function url_stat($uri, $flags)
    {
        $this->uri = $uri;

        try {
            return $this->getFilesystem()->stat($this->getTarget(), $flags);
        } catch (FileNotFoundException $e) {
            // File doesn't exist.
            if ( ! ($flags & STREAM_URL_STAT_QUIET)) {
                $this->triggerError('stat', $e);
            }
        } catch (\Exception $e) {
            $this->triggerError('stat', $e);
        }

        return false;
    }
1343432
public function get($url, $queries = null, callable $callback = null)
    {
        if ( is_array($queries) )
        {
            $queries = '?' . http_build_query($queries);
        }

        return $this->send($url . $queries, self::GET, [], $callback);
    }
823353
protected function addOptionalQueryParam(array &$queryParameters, $key, $value)
    {
        Validate::isString($key, 'key');
        Validate::isString($value, 'value');

        if (!is_null($value) && Resources::EMPTY_STRING !== $value) {
            $queryParameters[$key] = $value;
        }
    }
1120784
public function union(Query $query, $flag = null) {
        if ($flag === Dialect::ALL || $flag === Dialect::DISTINCT) {
            $query->attribute('flag', $flag);
        }

        return $this->_addCompound(Dialect::UNION, $query);
    }
310900
public function query_vars( array $vars ){
        if( !empty($this->query_var) ){
            foreach( $this->query_var as $var ){
                if( false === array_search($var, $vars) ){
                    $vars[] = $var;
                }
            }
        }
        return $vars;
    }
914192
public function searchDocflows($queryString, SearchScope $searchScope = null, $firstIndex = null, $count = 100)
    {
        return $this->diadocApi->searchDocflows($this->boxId, $queryString, $searchScope, $firstIndex, $count);
    }
75772
public function intersect(Query $query, $flag = null) {
        if ($flag === Dialect::ALL) {
            $query->attribute('flag', $flag);
        }

        return $this->_addCompound(Dialect::INTERSECT, $query);
    }
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');
        }
    }
274301
public function getTopTags($methodVars) {
		// Check for required variables
		if ( !empty($methodVars['artist']) && !empty($methodVars['track']) ) {
			$vars = array(
				'method' => 'track.gettoptags',
				'api_key' => $this->auth->apiKey
			);
			$vars = array_merge($vars, $methodVars);

			if ( $call = $this->apiGetCall($vars) ) {
				if ( count($call->toptags->tag) > 0 ) {
					$topTags['artist'] = (string) $call->toptags['artist'];
					$topTags['track'] = (string) $call->toptags['track'];
					$i = 0;
					foreach ( $call->toptags->tag as $tag ) {
						$topTags['tags'][$i]['name'] = (string) $tag->name;
						$topTags['tags'][$i]['count'] = (string) $tag->count;
						$topTags['tags'][$i]['url'] = (string) $tag->url;
						$i++;
					}
					return $topTags;
				}
				else {
					throw new NoResultsException('This track has no tags');
				}
			}
			else {
				return false;
			}
		}
		else {
			throw new InvalidArgumentException('You must include artist and track varialbes in the call for this method');
		}
	}