protected function render(array $p_parts = array())
{
if (empty($p_parts)) {
$p_parts = $this->m_parts;
}
if (!$this->isValidCache()) {
$this->m_path = $this->getURIPath();
$this->m_query = $this->getQuery();
}
$uriString = '';
foreach ($p_parts as $part) {
$property = 'm_' . $part;
if (!empty($this->{$property})) {
$uriString .= $part == 'scheme' ? $this->{$property} . '://' : '';
$uriString .= $part == 'user' ? $this->{$property} : '';
$uriString .= $part == 'password' ? ':' . $this->{$property} . '@' : '';
$uriString .= $part == 'host' ? $this->{$property} : '';
$uriString .= $part == 'port' ? ':' . $this->{$property} : '';
$uriString .= $part == 'path' ? $this->{$property} : '';
$uriString .= $part == 'query' ? '?' . $this->{$property} : '';
$uriString .= $part == 'fragment' ? '#' . $this->{$property} : '';
}
}
return $uriString;
}