From 229730a74c2686bdf501528cbe44a9421ccca61a Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Fri, 16 Sep 2005 14:07:26 +0000 Subject: [PATCH] - example fixup --- docs/examples/KISS_XMLRPC_Client.php | 2 +- docs/examples/Multipart_Posts.php | 2 +- docs/examples/Parallel_Requests.php | 4 ++-- docs/examples/Parallel_Requests_.php | 4 ++-- docs/examples/Simple_Feed_Aggregator.php | 3 --- docs/examples/tutorial.txt | 12 ++++++------ 6 files changed, 12 insertions(+), 15 deletions(-) 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'); } -- 2.30.2