Skip to content

Instantly share code, notes, and snippets.

@asimzeeshan
Created June 9, 2020 13:52
Show Gist options
  • Save asimzeeshan/8b8501e043bb7eb7d01eb1648a692508 to your computer and use it in GitHub Desktop.
Save asimzeeshan/8b8501e043bb7eb7d01eb1648a692508 to your computer and use it in GitHub Desktop.
for mohsin butt with love and kisses
<?php
function getURL($loc) {
switch ($loc) {
case "CU":
$host = $config->aulaIntegration->uniURL;
// wed don't need this
// $apiKey = $config->aulaIntegration->uniKey;
break;
case "CULC":
$host = $config->aulaIntegration->culuURL;
// wed don't need this
// $apiKey = $config->aulaIntegration->culuKey;
break;
default:
$host = $config->aulaIntegration->apiURL;
// wed don't need this
// $apiKey = $config->aulaIntegration->apiKey;
break;
}
return $host;
}
// now call this function
// drum rolls
$location = $config->aulaIntegration-> aulaLive->locationDetails;
$url = getURL($location);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment