summaryrefslogtreecommitdiffstats
path: root/class/FedoraClient.php
diff options
context:
space:
mode:
Diffstat (limited to 'class/FedoraClient.php')
-rw-r--r--class/FedoraClient.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/class/FedoraClient.php b/class/FedoraClient.php
index f1ce8f6..42a590b 100644
--- a/class/FedoraClient.php
+++ b/class/FedoraClient.php
@@ -44,8 +44,8 @@ abstract class FedoraClient
{
const VERSION='0.1.0-dev';
protected $url;
- private $agent;
- private $debug = 0;
+ private $_agent;
+ private $_debug = 0;
protected $cache;
function __construct ($url, array $options)
@@ -62,22 +62,22 @@ abstract class FedoraClient
$this->url = $url;
if (isset($options['agent']) && !empty($options['agent'])) {
- $this->agent = $options['agent'];
+ $this->_agent = $options['agent'];
} else {
- $this->agent = 'Fedora PHPClient/'.self::VERSION;
+ $this->_agent = 'Fedora PHPClient/'.self::VERSION;
}
if (isset($options['debug']) && intval($options['debug'])>0) {
- $this->debug = intval($options['debug']);
+ $this->_debug = intval($options['debug']);
}
$this->logDebug(
3,
- __CLASS__."::".__FUNCTION__.": url='$url', agent='".$this->agent."'"
+ __CLASS__."::".__FUNCTION__.": url='$url', agent='".$this->_agent."'"
);
}
function logDebug($level, $msg)
{
- if ($this->debug>=$level) {
+ if ($this->_debug>=$level) {
echo "[debug][$level] $msg\n";
}
}
@@ -103,7 +103,7 @@ abstract class FedoraClient
curl_setopt(
$curl,
CURLOPT_HTTPHEADER,
- array('User-agent: '.$this->agent, 'Accept: application/json')
+ array('User-agent: '.$this->_agent, 'Accept: application/json')
);
// run the request