summaryrefslogtreecommitdiffstats
path: root/class/FedoraClient.php
diff options
context:
space:
mode:
Diffstat (limited to 'class/FedoraClient.php')
-rw-r--r--class/FedoraClient.php38
1 files changed, 10 insertions, 28 deletions
diff --git a/class/FedoraClient.php b/class/FedoraClient.php
index 7aa2bbb..4071348 100644
--- a/class/FedoraClient.php
+++ b/class/FedoraClient.php
@@ -27,9 +27,9 @@
* @category Main
* @package FedoraClient
*
- * @author Remi Collet <unknown@unknwown.com>
+ * @author Remi Collet <remi@fedoraproject.org>
* @author Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2010 Remi Collet
+ * @copyright 2010-2013 Remi Collet
* @license http://www.gnu.org/licenses/lgpl-2.1.txt LGPL License 2.1 or (at your option) any later version
* @link http://github.com/remicollet/rpmphp/
* @since The begining of times.
@@ -72,19 +72,13 @@ abstract class FedoraClient
$this->_agent = 'Fedora PHPClient/'.self::VERSION;
}
- $this->logDebug(
- 3,
- __CLASS__."::".__FUNCTION__.": agent='".$this->_agent."'"
- );
+ $this->logDebug(3, __METHOD__.": agent='".$this->_agent."'");
}
function setUrl($url)
{
$this->url = $url;
- $this->logDebug(
- 3,
- __CLASS__."::".__FUNCTION__.": url='$url'"
- );
+ $this->logDebug(3, __METHOD__.": url='$url'");
}
function logDebug($level, $msg)
@@ -120,10 +114,7 @@ abstract class FedoraClient
);
// run the request
- $this->logDebug(
- 2,
- __CLASS__."::".__FUNCTION__.": call '$url'"
- );
+ $this->logDebug(2, __METHOD__.": call '$url'");
curl_exec($curl);
@@ -135,28 +126,22 @@ abstract class FedoraClient
if ($http_status==401 || $http_status==403) {
$this->logDebug(
1,
- __CLASS__."::".__FUNCTION__.
+ __METHOD__.
": http_status '$http_status' Authentication failed logging in"
);
return array();
} else if ($http_status>=400) {
$this->logDebug(
1,
- __CLASS__."::".__FUNCTION__.
+ __METHOD__.
": http_status '$http_status' Unknown HTTP Server Response"
);
return array();
} else {
- $this->logDebug(
- 2,
- __CLASS__."::".__FUNCTION__.": http_status '$http_status'"
- );
+ $this->logDebug(2, __METHOD__.": http_status '$http_status'");
}
- $this->logDebug(
- 2,
- __CLASS__."::".__FUNCTION__.": close connexion"
- );
+ $this->logDebug(2, __METHOD__.": close connexion");
curl_close($curl);
return json_decode($this->data, true);
@@ -164,10 +149,7 @@ abstract class FedoraClient
function receive($curl, $data)
{
- $this->logDebug(
- 9,
- __CLASS__."::".__FUNCTION__.": $data"
- );
+ $this->logDebug(9, __METHOD__.": $data");
$this->data .= $data;
return strlen($data);
}