Пример #1
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]));
 }
Пример #2
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);
 }
Пример #3
0
 /**
  * Signs a user out
  */
 public function signout()
 {
     Bootstart::registry('session')->clear('token');
 }