/** * Add single check test to local checklist */ public function addCheck($info, $test, $pass = "", $fail = "") { $info = Sanitize::toString($info); $test = Sanitize::toBool($test); $pass = Utils::value($pass, "Ready"); $fail = Utils::value($fail, "Missing"); $this->_checklist[] = array("info" => $info, "test" => $test, "pass" => $pass, "fail" => $fail); }
/** * Remove all back slashes from the working string */ public static function unescape($value = "") { $value = Sanitize::toString($value); $value = stripslashes(implode("", explode("\\", $value))); return $value; }
/** * Send file response */ public function sendFile($status, $mime, $file) { if (is_file($file)) { $this->setStatus($status); $this->setHeader("Content-Type", $mime); if (preg_match("/\\.php\$/i", $file) === 1) { $body = Sanitize::toString(include_once $file); $this->send($body); } $this->send("", $file); } $this->sendText(404, "File not found."); }