public function set_commented_object(ORM $underlying_object) { if (comments::can_comment_on($underlying_object)) { $this->underlying_object_name = $underlying_object->object_name; $this->underlying_object_id = $underlying_object->id; } else { throw new Comments_Not_Commentable_Object_Exception($underlying_object); } }