public function __construct($from_id = 0, $from_ip = "0.0.0.0", $to_id = 0, $subject = "A Message", $message = "Some Text", $read = False) { # PHP: the P stands for "really", the H stands for "awful" and the other P stands for "language" if (is_array($from_id)) { $a = $from_id; $this->id = $a["id"]; $this->from_id = $a["from_id"]; $this->from_ip = $a["from_ip"]; $this->to_id = $a["to_id"]; $this->sent_date = $a["sent_date"]; $this->subject = $a["subject"]; $this->message = $a["message"]; $this->is_read = undb_bool($a["is_read"]); } else { $this->id = -1; $this->from_id = $from_id; $this->from_ip = $from_ip; $this->to_id = $to_id; $this->subject = $subject; $this->message = $message; $this->is_read = $read; } }
public function get_bool($name, $default = null) { return undb_bool($this->get($name, $default)); }