-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUrlInterface.php
More file actions
88 lines (82 loc) · 1.89 KB
/
UrlInterface.php
File metadata and controls
88 lines (82 loc) · 1.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<?php
/**
* Url Interface
*
* @package Controller
* @copyright 2014 Amy Stephen. All rights reserved.
* @license http://www.opensource.org/licenses/mit-license.html MIT License
*/
namespace CommonApi\Application;
/**
* Url Interface
*
* @package Controller
* @license http://www.opensource.org/licenses/mit-license.html MIT License
* @copyright 2014 Amy Stephen. All rights reserved.
* @since 1.0
*/
interface UrlInterface
{
/**
* Retrieves Catalog ID for the specified Catalog Type ID and Source ID
*
* @param int $request_type
* @param null|int $catalog_type_id
* @param null|int $source_id
* @param null|int $url_sef_request
*
* @return mixed
* @since 1.0.0
*/
public function get($request_type = 1, $catalog_type_id = null, $source_id = null, $url_sef_request = null);
/**
* Add a Trailing Slash
*
* @param string $url
*
* @return string
* @since 1.0.0
*/
public function addTrailingSlash($url);
/**
* Remove the Trailing Slash
*
* @param string $url
*
* @return string
* @since 1.0.0
*/
public function removeTrailingSlash($url);
/**
* Add Site URL and application path to URL path
*
* @param string $path
*
* @return string
* @since 1.0.0
*/
public function getApplicationURL($path = '');
/**
* checkURLExternal - determines if it is a local site or external link
*
* @param string $url
*
* @return boolean
* @since 1.0.0
*/
public function checkURLExternal($url);
/**
* urlShortener
*
* @param string $url
* @param int $type
*
* 1 TinyURL
* 2 is.gd
* 3 Local
*
* @return string
* @since 1.0.0
*/
public function urlShortener($url, $type = 2);
}