public function __construct($username = null, $password = null, $baseUrl = null) { if (!$username) { $username = OneApiConfigurator::getUsername(); } if (!$password) { $password = OneApiConfigurator::getPassword(); } $this->username = $username; $this->password = $password; $this->baseUrl = $baseUrl ? $baseUrl : ONEAPI_BASE_URL; if ($this->baseUrl[strlen($this->baseUrl) - 1] != '/') { $this->baseUrl .= '/'; } # If true -- an exception will be thrown on error, otherwise, you have # to check the is_success and exception methods on resulting objects. $this->throwException = true; }