summaryrefslogtreecommitdiffstats
path: root/class/FedoraClient.php
diff options
context:
space:
mode:
Diffstat (limited to 'class/FedoraClient.php')
-rw-r--r--class/FedoraClient.php25
1 files changed, 18 insertions, 7 deletions
diff --git a/class/FedoraClient.php b/class/FedoraClient.php
index 62f8eac..7aa2bbb 100644
--- a/class/FedoraClient.php
+++ b/class/FedoraClient.php
@@ -42,7 +42,7 @@ require_once 'Cache/Lite.php';
abstract class FedoraClient
{
- const VERSION='0.1.0-dev';
+ const VERSION='0.2.0-dev';
protected $url;
private $_agent;
private $_debug = 0;
@@ -60,18 +60,30 @@ abstract class FedoraClient
)
);
- $this->url = $url;
+ if (isset($options['debug']) && intval($options['debug'])>0) {
+ $this->_debug = intval($options['debug']);
+ }
+
+ $this->setUrl($url);
+
if (isset($options['agent']) && !empty($options['agent'])) {
$this->_agent = $options['agent'];
} else {
$this->_agent = 'Fedora PHPClient/'.self::VERSION;
}
- if (isset($options['debug']) && intval($options['debug'])>0) {
- $this->_debug = intval($options['debug']);
- }
+
+ $this->logDebug(
+ 3,
+ __CLASS__."::".__FUNCTION__.": agent='".$this->_agent."'"
+ );
+ }
+
+ function setUrl($url)
+ {
+ $this->url = $url;
$this->logDebug(
3,
- __CLASS__."::".__FUNCTION__.": url='$url', agent='".$this->_agent."'"
+ __CLASS__."::".__FUNCTION__.": url='$url'"
);
}
@@ -161,4 +173,3 @@ abstract class FedoraClient
}
}
-?> \ No newline at end of file