Example #1
0
 /**
  * Removes an existing permission from the system, i.e. directly from the database.
  * @param  string  $name Unique name of the permission.
  * @return boolean       Whether the permission was successfully removed.
  */
 public static function remove($name)
 {
     self::$db->pushState()->bind('s', $name)->query('DELETE FROM sys_perms WHERE name=?');
     $result = self::$db->found();
     self::$db->popState();
     return $result;
 }
Example #2
0
 /**
  * Resets/empties the entire cache.
  */
 public static function reset()
 {
     self::$db->pushState()->select('sys_cache')->realTruncate()->popState();
 }