call setHost using API baspath when no apiclient is provided

This commit is contained in:
nmonterroso 2015-06-22 10:35:57 -07:00
parent e598384d97
commit 6f11092a57
2 changed files with 3 additions and 3 deletions

View File

@ -28,9 +28,9 @@ class ApiClient {
protected $defaultHeaders = array();
/**
* The host (from basePath)
* The host
*/
protected $host = '{{basePath}}';
protected $host = 'http://localhost';
/*
* @var string timeout (second) of the HTTP request, by default set to 0, no timeout

View File

@ -39,7 +39,7 @@ class {{classname}} {
function __construct($apiClient = null) {
if ($apiClient == null) {
$apiClient = new ApiClient();
$apiClient = (new ApiClient())->setHost('{{basePath}}');
}
$this->apiClient = $apiClient;