示例#1
0
 /**
  * Redirects the user by passing a meta script back to the page
  * @param string $url Where to redirect to
  * @param int $wait How long to wait before redirecting to
  * @return string The meta string
  */
 function meta($url, $wait = 0)
 {
     # If the meta redirect snippet does not exist, redirect using basic
     # method
     if (!file_exists('snippets/redirect/meta')) {
         $this->basic($url);
     }
     return Bootstart::view('snippets/redirect/meta', ['wait' => $wait, 'url' => $url]);
 }
 /**
  * Renders the default view
  * @return string
  */
 public function home()
 {
     # Render the response body
     return Bootstart::render('home');
 }
示例#3
0
 /**
  * Sends a notification to Slack
  * @param string $message The message
  * @param string $channel The Slack channel
  * @param string $webhook The Slack web hook
  */
 function notification($message, $channel = null, $webhook = "")
 {
     Bootstart::registry('curl')->request($webhook, "POST", "payload=" . json_encode(["channel" => $channel, "text" => $message]));
 }
示例#4
0
 /**
  * Sets session variables for the flash message
  * @param string $status The message status
  * @param string $message The message body
  */
 public function set($status, $message)
 {
     Bootstart::registry('session')->set('flash_type', $status);
     Bootstart::registry('session')->set('flash_message', $message);
 }
 /**
  * Signs a user out
  */
 public function signout()
 {
     Bootstart::registry('session')->clear('token');
 }