<?php

namespace Drupal\restaurant\App;

interface Base
{
  /**
  * Check if parameter exits
  * @param $name name of the parameter to check
  */
  public function hasParam($name);

  /**
  * shorthand for Drupal::routeMatch()->getParameter()
  */
  public function getParam($name);

  /**
  * returns the database connection Object
  */
  public function getDbConnection();

  /**
  * add a drupal error message to the page
  * @param $message message to display
  * @param $type message type, defaults to "message"
  */
  public function addMessage($name, $type);

  /**
  * return true if page is in the admin path
  */
  public function inAdminPath();

  /**
  * return the Drupal session Object
  */
  public function getSession();

  /**
  * Set a restaruant_setting to the database
  */
  public function setSetting($name, $value);

  /**
  * get a restaruant_setting from the database
  */
  public function getSetting($name);

  /**
  * redirect to $path
  */
  public function http_redirect($path);



}
