diff options
author | Johan "Papa" Cwiklinski <trasher@odysseus.(none)> | 2010-08-01 10:55:01 +0200 |
---|---|---|
committer | Johan "Papa" Cwiklinski <trasher@odysseus.(none)> | 2010-08-01 10:55:01 +0200 |
commit | 06a6a4f777272421970bb827c898f6d36f1ab669 (patch) | |
tree | 4080445f98b7530ac4dd78501ec0c7652ba8beed /class/FedoraClient.php | |
parent | 8563cd5e8404d11c0a76148c103acc363bd5776e (diff) |
Applying PEAR coding standards, refs #48
Diffstat (limited to 'class/FedoraClient.php')
-rw-r--r-- | class/FedoraClient.php | 16 |
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 |