CampURI::parse PHP Method

parse() private method

Parses the given URI.
private parse ( string $p_uri ) : boolean
$p_uri string The URI string
return boolean true on success, false on failure
    private function parse($p_uri)
    {
        $success = false;
        if (empty($p_uri)) {
            return $success;
        }
        $this->m_uri = $p_uri;
        $p_uri = urldecode($p_uri);
        if ($parts = @parse_url($p_uri)) {
            $success = true;
        }
        // sets the value for every URI part
        foreach ($this->m_parts as $part) {
            $property = 'm_' . $part;
            if (property_exists($this, $property)) {
                $this->{$property} = isset($parts[$part]) ? $parts[$part] : null;
            }
        }
        // populates the query array
        if (isset($parts['query']) && CampRequest::GetMethod() != 'POST') {
            parse_str($parts['query'], $this->m_queryArray);
        }
        return $success;
    }