1 2 3 4 5 6 7 8 9 10 11 12 13 14
<?php abstract class sql_row_with_flags extends sql_row_obj { public function has_flag($flag) { return (strpos($this->flags, $flag) !== false); } public function set_flag($flag) { if (!$this->has_flag($flag)) $this->flags.=$flag; } public function unset_flag($flag) { $this->flags=str_replace($flag, '', $this->flags); } } ?>