/**
  * Initialize API by loading the user's token and enforcing authorization
  *
  * @return null
  */
 public static function init()
 {
     self::$method = preg_replace("/[^A-Za-z0-9_ ]/", '', \TaskerMAN\Core\IO::GET('method'));
     self::$token = \TaskerMAN\Core\IO::GET('token');
     self::enforceLogin();
     self::execute();
 }
 /** 
  * Initalizes the web interface by enforcing logins, validating that the page
  * that's requested exists and that the user has permission to view it, then
  * loads the user's information, then finally executes the page
  */
 public static function init()
 {
     Session::init();
     self::$page = preg_replace("/[^A-Za-z0-9_ ]/", '', IO::GET('p'));
     self::enforceLogin();
     self::validatePage();
     self::loadLoggedInUser();
     self::execute();
 }
 /**
  * Set a session variable to a given value
  *
  * @param string $key
  * @param mixed $value
  * @return boolean
  */
 public static function set($key, $value)
 {
     $_SESSION[$key] = IO::sanitize($value);
     return true;
 }