Miscellany
public php v1 · immutablepublic function __cal($method, $argument) { echo "call to method $method"; $propertyName = "_".strtolower(substr($method,4)); switch (substr($method, 0, 3)) { case "get": return $this->$propertyName; break; case "set": $this->$propertyName = $argument[0]; break; default: assert(false == "should never reach here! (call to non-existing method on object [$this])"); } }