Quantcast
Viewing latest article 8
Browse Latest Browse All 30

$sodapop->parseUrl($part)

parseUrl() retrieves the URI and breaks it up into it's various parts
Parameter: $part - Indicates which part of the URL is being parsed, the handle or the query string.  Values expected: handle, qString
Location: class.sodapop.php

public function parseUrl($part) {

## Get the URI for the currently requested app
$uri = $_SERVER['REQUEST_URI'];
## Pull app handle and query string from domain etc
list($this->domain, $this->appUrl) = explode($this->config['liveSite'], $uri);

## Separate the apps handle from the query string
list($this->handle, $this->queryString,) = explode("?", $this->appUrl);
## Ditch the slash separator
$this->handle = str_replace("/", "", $this->handle);

if ($part == 'handle') {
$this->string = $this->handle;
}
if ($part == 'qString') {
$this->string = $this->queryString;
$this->string = $this->getStringVars($this->string);

}
return $this->string;
}

Viewing latest article 8
Browse Latest Browse All 30

Trending Articles