Author: chabotc
Date: Wed Nov 19 00:10:29 2008
New Revision: 718900
URL: http://svn.apache.org/viewvc?rev=718900&view=rev
Log:
Define user_agent as a const, thanks for pointing that out bruno :)
Modified:
incubator/shindig/trunk/php/src/common/sample/BasicRemoteContentFetcher.php
Modified:
incubator/shindig/trunk/php/src/common/sample/BasicRemoteContentFetcher.php
URL:
http://svn.apache.org/viewvc/incubator/shindig/trunk/php/src/common/sample/BasicRemoteContentFetcher.php?rev=718900&r1=718899&r2=718900&view=diff
==============================================================================
--- incubator/shindig/trunk/php/src/common/sample/BasicRemoteContentFetcher.php
(original)
+++ incubator/shindig/trunk/php/src/common/sample/BasicRemoteContentFetcher.php
Wed Nov 19 00:10:29 2008
@@ -24,7 +24,7 @@
*/
class BasicRemoteContentFetcher extends RemoteContentFetcher {
private $requests = array();
- private $USER_AGENT = 'Shindig PHP';
+ const USER_AGENT = 'Shindig PHP';
public function fetchRequest($request)
{
@@ -54,7 +54,7 @@
}
}
}
- $outHeaders[] = "User-Agent: " . $this->USER_AGENT;
+ $outHeaders[] = "User-Agent: " .
BasicRemoteContentFetcher::USER_AGENT;
curl_setopt($request->handle, CURLOPT_HTTPHEADER,
$outHeaders);
}
if ($request->isPost()) {
@@ -118,7 +118,7 @@
}
}
}
- $outHeaders[] = "User-Agent: " .
$this->USER_AGENT;
+ $outHeaders[] = "User-Agent: " .
BasicRemoteContentFetcher::USER_AGENT;
curl_setopt($request->handle,
CURLOPT_HTTPHEADER, $outHeaders);
}
if ($request->isPost()) {