Total Complexity | 9 |
Total Lines | 45 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
4 | trait RequestUrlTrait |
||
5 | { |
||
6 | public function getAppUrl() |
||
16 | } |
||
17 | |||
18 | public function getShortUrl() |
||
24 | } |
||
25 | |||
26 | public function getUrl($removeParameters = []) |
||
27 | { |
||
28 | $url = $this->getShortUrl(); |
||
29 | $query = $this->getQuery(); |
||
30 | foreach ($removeParameters as $item) { |
||
31 | if (array_key_exists($item, $query)) { |
||
32 | unset($query[$item]); |
||
33 | } |
||
34 | } |
||
35 | $url .= $this->queryToString($query); |
||
36 | return $url; |
||
37 | } |
||
38 | |||
39 | public function queryToString($query = []) |
||
49 | } |
||
50 | } |
||
51 |