Start to improve task Api operations and doc

This commit is contained in:
Frédéric Guillot
2014-09-05 18:57:58 -07:00
parent a0dcfc9e4c
commit 532ea3b868
6 changed files with 347 additions and 38 deletions

View File

@@ -27,14 +27,6 @@ class Client
*/
private $timeout;
/**
* Debug flag
*
* @access private
* @var bool
*/
private $debug;
/**
* Username for authentication
*
@@ -69,14 +61,12 @@ class Client
* @access public
* @param string $url Server URL
* @param integer $timeout Server URL
* @param bool $debug Debug flag
* @param array $headers Custom HTTP headers
*/
public function __construct($url, $timeout = 5, $debug = false, $headers = array())
public function __construct($url, $timeout = 5, $headers = array())
{
$this->url = $url;
$this->timeout = $timeout;
$this->debug = $debug;
$this->headers = array_merge($this->headers, $headers);
}
@@ -133,9 +123,6 @@ class Client
if (isset($result['id']) && $result['id'] == $id && array_key_exists('result', $result)) {
return $result['result'];
}
else if ($this->debug && isset($result['error'])) {
print_r($result['error']);
}
return null;
}