Skip to content

Commit

Permalink
tweaks; variable sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
slusarz committed Feb 11, 2014
1 parent 017da10 commit 58afba3
Showing 1 changed file with 16 additions and 17 deletions.
33 changes: 16 additions & 17 deletions framework/Url/lib/Horde/Url.php
Expand Up @@ -26,18 +26,18 @@
class Horde_Url
{
/**
* The basic URL, without query parameters.
* The anchor string.
*
* @var string
*/
public $url;
public $anchor = '';

/**
* Whether to output the URL in the raw URL format or HTML-encoded.
* Any PATH_INFO to be added to the URL.
*
* @var boolean
* @var string
*/
public $raw;
public $pathInfo;

/**
* The query parameters.
Expand All @@ -50,25 +50,25 @@ class Horde_Url
public $parameters = array();

/**
* Any PATH_INFO to be added to the URL.
* Whether to output the URL in the raw URL format or HTML-encoded.
*
* @var string
* @var boolean
*/
public $pathInfo;
public $raw;

/**
* The anchor string.
* A callback function to use when converting to a string.
*
* @var string
* @var callback
*/
public $anchor = '';
public $toStringCallback;

/**
* A callback function to use when converting to a string.
* The basic URL, without query parameters.
*
* @var callback
* @var string
*/
public $toStringCallback;
public $url;

/**
* Constructor.
Expand Down Expand Up @@ -285,10 +285,9 @@ protected function _getParameters()
foreach ($v as $val) {
$params[] = rawurlencode($p) . '[]=' . rawurlencode($val);
}
} elseif (strlen($v)) {
$params[] = rawurlencode($p) . '=' . rawurlencode($v);
} else {
$params[] = rawurlencode($p);
$params[] = rawurlencode($p) .
(strlen($v) ? ('=' . rawurlencode($v)) : '');
}
}

Expand Down

0 comments on commit 58afba3

Please sign in to comment.