diff options
author | Remi Collet <fedora@famillecollet.com> | 2013-11-17 17:46:48 +0100 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2013-11-17 17:46:48 +0100 |
commit | be9f96e74ef96c85ef0b9c11c30f220c140ad48a (patch) | |
tree | 81105b8299b8f71fadb7a294d9157ee352180e7f /class/FedoraClient.php | |
parent | 267655746e046f63a26cba2c57439fd9469db51a (diff) |
WIP for pkgdb2
Diffstat (limited to 'class/FedoraClient.php')
-rw-r--r-- | class/FedoraClient.php | 25 |
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 |