| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 3 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 29 | protected function getEndpointURL(): string |
||
| 30 | { |
||
| 31 | /** |
||
| 32 | * If accessing from Nginx, the server_name might point to localhost |
||
| 33 | * instead of the actual server domain. So use the user-requested host |
||
| 34 | */ |
||
| 35 | $fullURL = RequestUtils::getRequestedFullURL(true); |
||
| 36 | // Remove the ?view=... |
||
| 37 | $endpointURL = \remove_query_arg(RequestParams::VIEW, $fullURL); |
||
| 38 | // // Maybe add ?use_namespace=true |
||
| 39 | // if (ComponentModelComponentConfiguration::namespaceTypesAndInterfaces()) { |
||
| 40 | // $endpointURL = \add_query_arg(APIRequest::URLPARAM_USE_NAMESPACE, true, $endpointURL); |
||
| 41 | // } |
||
| 42 | return $endpointURL; |
||
| 43 | } |
||
| 45 |