@@ -103,37 +103,51 @@ class Net_URL2
103103 );
104104
105105 /**
106- * @var string|bool
106+ * The scheme, false for none
107+ *
108+ * @var string|bool
107109 */
108110 private $ _scheme = false ;
109111
110112 /**
111- * @var string|bool
113+ * The user, false for no userinfo
114+ *
115+ * @var string|bool
112116 */
113117 private $ _userinfo = false ;
114118
115119 /**
116- * @var string|bool
120+ * The host, false for no authority
121+ *
122+ * @var string|bool
117123 */
118124 private $ _host = false ;
119125
120126 /**
121- * @var string|bool
127+ * The port number, false for no port number
128+ *
129+ * @var string|bool
122130 */
123131 private $ _port = false ;
124132
125133 /**
126- * @var string
134+ * The path
135+ *
136+ * @var string
127137 */
128138 private $ _path = '' ;
129139
130140 /**
131- * @var string|bool
141+ * The query string without the leading "?" (search), false for no query
142+ *
143+ * @var string|bool
132144 */
133145 private $ _query = false ;
134146
135147 /**
136- * @var string|bool
148+ * The fragment name without the leading "#" (anchor), false for no "#" fragment
149+ *
150+ * @var string|bool
137151 */
138152 private $ _fragment = false ;
139153
@@ -143,7 +157,7 @@ class Net_URL2
143157 * @param string $url an absolute or relative URL
144158 * @param array $options an array of OPTION_xxx constants
145159 *
146- * @uses self::parseUrl()
160+ * @uses self::parseUrl()
147161 */
148162 public function __construct ($ url , array $ options = array ())
149163 {
@@ -369,8 +383,8 @@ public function getAuthority()
369383 * false if there is no authority.
370384 *
371385 * @param string|bool $authority a hostname or an IP address, possibly
372- * with userinfo prefixed and port number
373- * appended, e.g. "foo:bar@example.org:81".
386+ * with userinfo prefixed and port number
387+ * appended, e.g. "foo:bar@example.org:81".
374388 *
375389 * @return $this
376390 */
@@ -428,8 +442,8 @@ public function setPath($path)
428442 * Returns the query string (excluding the leading "?"), or false if "?"
429443 * is not present in the URL.
430444 *
431- * @return string|bool
432- * @see getQueryVariables
445+ * @return string|bool
446+ * @see getQueryVariables
433447 */
434448 public function getQuery ()
435449 {
@@ -480,6 +494,7 @@ public function setFragment($fragment)
480494 * $_GET in a PHP script. If the URL does not contain a "?", an empty array
481495 * is returned.
482496 *
497+ * @throws Exception
483498 * @return array
484499 */
485500 public function getQueryVariables ()
@@ -523,6 +538,7 @@ public function getQueryVariables()
523538 * @param string $value query-value
524539 * @param array $array of existing query variables (if any)
525540 *
541+ * @throws Exception
526542 * @return mixed
527543 */
528544 private function _queryArrayByKey ($ key , $ value , array $ array = array ())
@@ -667,6 +683,7 @@ public function setQueryVariables(array $array)
667683 * @param string $name variable name
668684 * @param mixed $value variable value
669685 *
686+ * @throws Exception
670687 * @return $this
671688 */
672689 public function setQueryVariable ($ name , $ value )
@@ -682,6 +699,7 @@ public function setQueryVariable($name, $value)
682699 *
683700 * @param string $name a query string variable, e.g. "foo" in "?foo=1"
684701 *
702+ * @throws Exception
685703 * @return void
686704 */
687705 public function unsetQueryVariable ($ name )
@@ -747,7 +765,7 @@ private function _buildAuthorityAndPath($authority, $path)
747765 * Returns a string representation of this URL.
748766 *
749767 * @return string
750- * @link https://php.net/language.oop5.magic#object.tostring
768+ * @link https://php.net/language.oop5.magic#object.tostring
751769 */
752770 public function __toString ()
753771 {
@@ -834,8 +852,8 @@ public function normalize()
834852 * @param string|array $mixed string or array of strings to normalize
835853 *
836854 * @return string|array
837- * @see normalize
838- * @see _normalizeCallback()
855+ * @see normalize
856+ * @see _normalizeCallback()
839857 */
840858 private function _normalize ($ mixed )
841859 {
@@ -851,8 +869,9 @@ private function _normalize($mixed)
851869 * @param array $matches as by preg_replace_callback
852870 *
853871 * @return string
854- * @see normalize
855- * @see _normalize
872+ * @see normalize
873+ * @see _normalize
874+ *
856875 * @SuppressWarnings(PHPMD.UnusedPrivateMethod)
857876 */
858877 private function _normalizeCallback ($ matches )
@@ -949,8 +968,9 @@ public function resolve($reference)
949968 /**
950969 * URL is fragment-only
951970 *
952- * @SuppressWarnings(PHPMD.UnusedPrivateMethod)
953971 * @return bool
972+ *
973+ * @SuppressWarnings(PHPMD.UnusedPrivateMethod)
954974 */
955975 private function _isFragmentOnly ()
956976 {
@@ -1072,7 +1092,8 @@ public static function getCanonical()
10721092 /**
10731093 * Returns the URL used to retrieve the current request.
10741094 *
1075- * @return string
1095+ * @throws Exception
1096+ * @return string
10761097 */
10771098 public static function getRequestedURL ()
10781099 {
@@ -1191,9 +1212,9 @@ protected function parseUrl($url)
11911212 * @param string $url URL
11921213 *
11931214 * @return string
1194- * @see parseUrl
1195- * @see setAuthority
1196- * @link https://pear.php.net/bugs/bug.php?id=20425
1215+ * @see parseUrl
1216+ * @see setAuthority
1217+ * @link https://pear.php.net/bugs/bug.php?id=20425
11971218 */
11981219 private function _encodeData ($ url )
11991220 {
@@ -1204,12 +1225,13 @@ private function _encodeData($url)
12041225 }
12051226
12061227 /**
1207- * callback for encoding character data
1228+ * Callback for encoding character data
12081229 *
12091230 * @param array $matches Matches
12101231 *
12111232 * @return string
1212- * @see _encodeData
1233+ * @see _encodeData
1234+ *
12131235 * @SuppressWarnings(PHPMD.UnusedPrivateMethod)
12141236 */
12151237 private function _encodeCallback (array $ matches )
0 commit comments