22/**
33 * Library for urls manipulation.
44 *
5- * @author Josantonius - hello@josantonius.com
6- * @author David Carr - dave@simplemvcframework.com
7- * @copyright Copyright (c) 2017
8- * @license https://opensource.org/licenses/MIT - The MIT License (MIT)
9- * @link https://github.com/Josantonius/PHP-Url
10- * @since 1.0.0
5+ * @author Josantonius - hello@josantonius.com
6+ * @author David Carr - dave@simplemvcframework.com
7+ * @copyright 2017 - 2018 (c) Josantonius - PHP-Url
8+ * @license https://opensource.org/licenses/MIT - The MIT License (MIT)
9+ * @link https://github.com/Josantonius/PHP-Url
10+ * @since 1.0.0
1111 */
1212namespace Josantonius \Url ;
1313
1414/**
1515 * URL handler.
16- *
17- * @since 1.0.0
1816 */
1917class Url
2018{
2119 /**
2220 * Get URL from the current page.
2321 *
24- * @since 1.0.0
25- *
2622 * @return string → URL
2723 */
2824 public static function getCurrentPage ()
@@ -58,8 +54,6 @@ public static function getBaseUrl()
5854 /**
5955 * Get protocol from current or passed URL.
6056 *
61- * @since 1.0.0
62- *
6357 * @param string $url
6458 *
6559 * @return string → http|https
@@ -81,8 +75,6 @@ public static function getProtocol($url = false)
8175 /**
8276 * Check if it is a secure site (SSL).
8377 *
84- * @since 1.0.0
85- *
8678 * @param string $url
8779 *
8880 * @return bool
@@ -95,8 +87,6 @@ public static function isSSL($url = false)
9587 /**
9688 * Get the server name.
9789 *
98- * @since 1.0.0
99- *
10090 * @param string $url
10191 *
10292 * @return string|false → server name
@@ -115,8 +105,6 @@ public static function getDomain($url = false)
115105 /**
116106 * Get URI.
117107 *
118- * @since 1.0.0
119- *
120108 * @return string → path/URL
121109 */
122110 public static function getUri ()
@@ -127,8 +115,6 @@ public static function getUri()
127115 /**
128116 * Remove subdirectories from URI if they exist.
129117 *
130- * @since 1.0.0
131- *
132118 * @return string → method1/method2/method3
133119 */
134120 public static function getUriMethods ()
@@ -178,8 +164,6 @@ public static function setUrlParams($url = false)
178164 /**
179165 * Get the server port.
180166 *
181- * @since 1.0.0
182- *
183167 * @return int → server port
184168 */
185169 public static function getPort ()
@@ -190,8 +174,6 @@ public static function getPort()
190174 /**
191175 * Add backslash if it does not exist at the end of the route.
192176 *
193- * @since 1.0.0
194- *
195177 * @param string $uri → URI
196178 * @param string $position → place where the backslash is placed
197179 *
@@ -218,8 +200,6 @@ public static function addBackSlash($uri, $position = 'end')
218200
219201 /**
220202 * Go to the previous URL.
221- *
222- * @since 1.0.0
223203 */
224204 public static function previous ()
225205 {
@@ -230,8 +210,6 @@ public static function previous()
230210 /**
231211 * Redirect to chosen URL.
232212 *
233- * @since 1.0.0
234- *
235213 * @param string $url → the URL to redirect
236214 */
237215 public static function redirect ($ url )
@@ -244,8 +222,6 @@ public static function redirect($url)
244222 * Converts plain text URLS into HTML links.
245223 * Second argument will be used as the URL label <a href=''>$custom</a>.
246224 *
247- * @since 1.0.0
248- *
249225 * @param string $url → URL
250226 * @param string $custom → if provided, this is used for the link label
251227 *
@@ -269,8 +245,6 @@ public static function autoLink($url, $custom = null)
269245 * For example: `test name @132` will be converted to `test-name--123`.
270246 * It will also return all letters in lowercase
271247 *
272- * @since 1.0.0
273- *
274248 * @param string $slug → URL slug to clean up
275249 *
276250 * @return string → slug
@@ -303,8 +277,6 @@ public static function segmentUri($uri = null)
303277 /**
304278 * Get first item segment.
305279 *
306- * @since 1.0.0
307- *
308280 * @return string → segment
309281 */
310282 public static function getFirstSegment ($ segments )
@@ -317,8 +289,6 @@ public static function getFirstSegment($segments)
317289 /**
318290 * Get last item segment.
319291 *
320- * @since 1.0.0
321- *
322292 * @return string → segment
323293 */
324294 public static function getLastSegment ($ segments )
0 commit comments