PHP4 Class Functionality
Posted: Thu Mar 17, 2005 1:07 pm
Hi,
Wrote a simple class for a PHP5 server, but now someone wants to buy the script for use on php4. I've gotten everything working, except this.
I know __set and __get are php5 only, but how would you achieve something similar in PHP4, I'd assume to write another function to take the place of this, and call it rather than implicitly run it like I did in 5?
Thanks,
Josh
feyd | Please use
Wrote a simple class for a PHP5 server, but now someone wants to buy the script for use on php4. I've gotten everything working, except this.
Code: Select all
// Set Attribute Function
Function __set($name, $value) {
// Check if password submitted, and md5 it
if ($name == "Password") {
$value = md5($value);
}
$this->$name = $value;
}Thanks,
Josh
feyd | Please use
Code: Select all
andCode: Select all
tags where approriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]