From 06a6a4f777272421970bb827c898f6d36f1ab669 Mon Sep 17 00:00:00 2001 From: "Johan \"Papa\" Cwiklinski" Date: Sun, 1 Aug 2010 10:55:01 +0200 Subject: Applying PEAR coding standards, refs #48 --- class/FedoraClient.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'class/FedoraClient.php') 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 -- cgit