reset(); } function reset() { $this->allowed_types = array(); } function allowContentType($type) { $this->allowed_types[] = strtolower($type); } function canPass($type) { if(!in_array($type, $this->allowed_types)) return false; return true; } } ?>