/** * retrieves the current status from the request * * @private * @return nothing */ function getStatusFromRequest() { $status = HttpVars::getRequestValue("status"); // validate the value $val = new IntegerValidator(); if (!$val->validate($status)) { $status = BlogStatus::getDefaultStatus(); } // if the value validated, check if it is a valid status if (!BlogStatus::isValidStatus($status)) { $status = BlogStatus::getDefaultStatus(); } return $status; }