From: Michael Wallner Date: Fri, 16 Sep 2005 14:07:26 +0000 (+0000) Subject: - example fixup X-Git-Tag: RELEASE_0_14_0~21 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=229730a74c2686bdf501528cbe44a9421ccca61a;p=m6w6%2Fext-http - example fixup --- diff --git a/docs/examples/KISS_XMLRPC_Client.php b/docs/examples/KISS_XMLRPC_Client.php index 35380db..b9e955b 100644 --- a/docs/examples/KISS_XMLRPC_Client.php +++ b/docs/examples/KISS_XMLRPC_Client.php @@ -7,7 +7,7 @@ class XmlRpcClient public function __construct($url, $namespace = '') { $this->namespace = $namespace; - $this->request = new HttpRequest($url, HTTP_POST); + $this->request = new HttpRequest($url, HTTP_METH_POST); $this->request->setContentType('text/xml'); } diff --git a/docs/examples/Multipart_Posts.php b/docs/examples/Multipart_Posts.php index eb9b171..2656b31 100644 --- a/docs/examples/Multipart_Posts.php +++ b/docs/examples/Multipart_Posts.php @@ -1,5 +1,5 @@ attach(new HttpRequest('http://pear.php.net', HTTP_HEAD)); - $p->attach(new HttpRequest('http://pecl.php.net', HTTP_HEAD)); + $p->attach(new HttpRequest('http://pear.php.net', HTTP_METH_HEAD)); + $p->attach(new HttpRequest('http://pecl.php.net', HTTP_METH_HEAD)); } catch (HttpException $e) { print $e; exit; diff --git a/docs/examples/Parallel_Requests_.php b/docs/examples/Parallel_Requests_.php index 94c69df..8798c30 100644 --- a/docs/examples/Parallel_Requests_.php +++ b/docs/examples/Parallel_Requests_.php @@ -4,8 +4,8 @@ class Pool extends HttpRequestPool public function __construct() { parent::__construct( - new HttpRequest('http://pear.php.net', HTTP_HEAD), - new HttpRequest('http://pecl.php.net', HTTP_HEAD) + new HttpRequest('http://pear.php.net', HTTP_METH_HEAD), + new HttpRequest('http://pecl.php.net', HTTP_METH_HEAD) ); // HttpRequestPool methods socketPerform() and socketSelect() are diff --git a/docs/examples/Simple_Feed_Aggregator.php b/docs/examples/Simple_Feed_Aggregator.php index 074c207..c28e838 100644 --- a/docs/examples/Simple_Feed_Aggregator.php +++ b/docs/examples/Simple_Feed_Aggregator.php @@ -110,9 +110,6 @@ class FeedAggregator } $this->saveFeed($this->url2name($r->getUrl()), $body); } - echo $r->getHistory(); } } -$a = new FeedAggregator(); -$a->getFeed('http://www.planet-php.net/rss/'); ?> diff --git a/docs/examples/tutorial.txt b/docs/examples/tutorial.txt index d8d9fad..b29fa96 100644 --- a/docs/examples/tutorial.txt +++ b/docs/examples/tutorial.txt @@ -44,7 +44,7 @@ try { redirect option. attach(new HttpRequest('http://pear.php.net', HTTP_HEAD)); - $p->attach(new HttpRequest('http://pecl.php.net', HTTP_HEAD)); + $p->attach(new HttpRequest('http://pear.php.net', HTTP_METH_HEAD)); + $p->attach(new HttpRequest('http://pecl.php.net', HTTP_METH_HEAD)); } catch (HttpException $e) { print $e; exit; @@ -112,8 +112,8 @@ class Pool extends HttpRequestPool public function __construct() { parent::__construct( - new HttpRequest('http://pear.php.net', HTTP_HEAD), - new HttpRequest('http://pecl.php.net', HTTP_HEAD) + new HttpRequest('http://pear.php.net', HTTP_METH_HEAD), + new HttpRequest('http://pecl.php.net', HTTP_METH_HEAD) ); // HttpRequestPool methods socketPerform() and socketSelect() are @@ -186,7 +186,7 @@ class XmlRpcClient public function __construct($url, $namespace = '') { $this->namespace = $namespace; - $this->request = new HttpRequest($url, HTTP_POST); + $this->request = new HttpRequest($url, HTTP_METH_POST); $this->request->setContentType('text/xml'); }