1 | <?php |
||
31 | abstract class Link |
||
32 | { |
||
33 | /** |
||
34 | * Checks if options are fetched already |
||
35 | **/ |
||
36 | private static $_init = false; |
||
37 | |||
38 | /** |
||
39 | * Stores if ajax links are activated |
||
40 | **/ |
||
41 | private static $_ajax = false; |
||
42 | |||
43 | /** |
||
44 | * Stores if pretty links are activated |
||
45 | **/ |
||
46 | private static $_pretty = false; |
||
47 | |||
48 | /** |
||
49 | * Stores the request array data |
||
50 | **/ |
||
51 | private static $_request = ''; |
||
52 | |||
53 | /** |
||
54 | * Stores the plugin part of links |
||
55 | **/ |
||
56 | private static $_plugin = ''; |
||
57 | |||
58 | /** |
||
59 | * Stores the action part of links |
||
60 | **/ |
||
61 | private static $_action = ''; |
||
62 | |||
63 | /** |
||
64 | * Stores the key part of links |
||
65 | **/ |
||
66 | private static $_key = ''; |
||
67 | |||
68 | /** |
||
69 | * Stores the value part of links |
||
70 | **/ |
||
71 | private static $_value = ''; |
||
72 | |||
73 | /** |
||
74 | * Fetch options and set flags |
||
75 | * |
||
76 | * @return void |
||
77 | **/ |
||
|
|||
78 | |||
79 | private static function _init() |
||
108 | |||
109 | /** |
||
110 | * Creates a link for the specified parameters |
||
111 | * |
||
112 | * @param string $plugin Plugin |
||
113 | * @param string $action Action |
||
114 | * @param array $params Array of key value pairs where value can be empty |
||
115 | * |
||
116 | * @return string |
||
117 | **/ |
||
118 | |||
119 | public static function href($plugin, $action, array $params = []) |
||
151 | |||
152 | /** |
||
153 | * Creates a link for the current parameters |
||
154 | * |
||
155 | * @return string |
||
156 | **/ |
||
157 | |||
158 | public static function current() |
||
172 | |||
173 | /** |
||
174 | * Combines the request data for sharing the link |
||
175 | * |
||
176 | * @param string $link Unencoded local part e.g. generated by href method |
||
177 | * |
||
178 | * @return string |
||
179 | **/ |
||
180 | |||
181 | public static function share($link) |
||
191 | |||
192 | /** |
||
193 | * Prepares link urls |
||
194 | * |
||
195 | * @param string $url The internal url that is used in slash syntax |
||
196 | * |
||
197 | * @throws \Exception |
||
198 | * |
||
199 | * @return string |
||
200 | **/ |
||
201 | |||
202 | public static function params($url) |
||
253 | |||
254 | /** |
||
255 | * Transforms a slash-separated string to an key value array |
||
256 | * |
||
257 | * @param string $url The internal url that is used in slash syntax |
||
258 | * |
||
259 | * @return array |
||
260 | **/ |
||
261 | |||
262 | public static function transform($url) |
||
280 | } |
||
281 |