It was built to extend. Option 1 is the most correct way, although option 2 is certainly a possibility, it is not to my taste.
Option 3 is a nono. The idea is to make it so that your functionality is not broken or erased if I update the class and you want my updates. See, if you mod the class then I do, you'll undo your mods by taking mine on. If your class extends mine, and provided I've done my work correctly, then you just copy the new code into your class file and the new code will be available to your inherited class without muss or fuss.
Another thought is that there are event pops in the class - onSuccess for example.
Consider this:
<?php
$req = new webRequest2();
$req->onSuccess = 'handleSuccess';
$req->simpleGet('http://www.perkiset.org');
function handleSuccess($sender)
{
// Do some code because the request succeeded...
}
?>
In this example, I've added an event handler for the onSuccess event that is fired after a URL has been successfully pulled down. There is an onFailure as well.
(I noticed that there was a bug in all of this while I was writing this post, so I updated the code in the webRequest thread... - you'll want to go get it... please give'r a shot and let me know if it burps on you at all... looks good from my end)
This is another technique for when you have code you want executed that is really specific to <this> application and you'll never need to use it again... so there is no need to extend the class.
Ping back if you need more,
/p