New classes
| From: | Richard Heyes | Date: | Fri, 01 Feb 2002 23:33:14 +0000 |
| Subject: | New classes | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-4340@lists.php.net to get a copy of this message | ||
Having spent the week mostly coding in preference to watching terrestrial TV
in a hotel, I've come up with some new code that may be interesting.
*** All should be considered "work in progress" ***
HTTP_URL (http://phpguru.org/pear/HTTP_URL.phps)
This class is intended to handle urls. Give it a url in the constructor and
it will split it up into it's constituent parts for easy access. Stig
mentioned on irc that it might be better named as URL, and also advised
looking up this java class which looks interesting:
http://hpdrc.cs.fiu.edu/sdbtools/VisualCafe/Documentation/Java/java.net.URL.
html
HTTP_Request (http://phpguru.org/pear/HTTP_Request.phps)
This class handles making a http request via get or post, and returning the
results. I envisioned it to sit underneath HTTP_POST in the great tree
structured scheme of things. It also makes use of HTTP_URL. This one is far
from finished. This could also make use of cURL if it's available to speed
things up and make http request nice and portable.
Pager_Array (http://phpguru.org/pear/Pager_Array.phps)
Inspired by Tomas' DB_Pager class when I found it was specific to SQL
(doh!). Give it an indexed array of "stuff" and it will page it for you.
Contains a couple of handy functions to return the next/back/page number
links. No idea where this could sit - I'm doubtful a Pager category is
warranted.
--
Richard Heyes
"When you were born, you cried and the world rejoiced. Live your life
so that when you die, the world cries and you rejoice " - Cherokee saying