chore(legacy): use Config::getPublicUrl helper
Replace Application_Common_HTTPHelper::getStationUrl with Config::getPublicUrl.
This commit is contained in:
parent
72960593c7
commit
829b9bcd5b
17 changed files with 23 additions and 51 deletions
|
@ -1,7 +1,5 @@
|
|||
<?php
|
||||
|
||||
use League\Uri\Uri;
|
||||
|
||||
class Application_Common_HTTPHelper
|
||||
{
|
||||
/**
|
||||
|
@ -22,29 +20,6 @@ class Application_Common_HTTPHelper
|
|||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct the base station URL.
|
||||
*
|
||||
* @param bool $secured whether or not to use HTTPS
|
||||
*
|
||||
* @return string the station URL
|
||||
*/
|
||||
public static function getStationUrl($secured = true)
|
||||
{
|
||||
$CC_CONFIG = Config::getConfig();
|
||||
|
||||
$url = Uri::createFromComponents(
|
||||
[
|
||||
'scheme' => $CC_CONFIG['protocol'],
|
||||
'host' => $CC_CONFIG['baseUrl'],
|
||||
'port' => $CC_CONFIG['basePort'],
|
||||
'path' => $CC_CONFIG['baseDir'],
|
||||
]
|
||||
);
|
||||
|
||||
return rtrim($url, '/') . '/';
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute a cURL POST.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue