Created
March 22, 2012 12:02
-
-
Save johanhar/2157928 to your computer and use it in GitHub Desktop.
lawl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function __get($name, $value) { | |
if ($name == "tariff" && get_called_class() != get_class($this)) { | |
return (intval($this->$name) / 100); | |
} else if ($name == "durationType" && get_called_class() != get_class($this)) { | |
} else { | |
return $this->$name; | |
} | |
} | |
public function __set($name, $value) { | |
if ($name == "tariff" && get_called_class() != get_class($this)) { | |
$this->$name = (intval($value) * 100); | |
} else { | |
$this->$name = $value; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment