<?php

//! Base controller
class Controller {

	//! HTTP route pre-processor
	/**
	 * @param $f3 \Base
	 */
	function beforeroute($f3) {

	//DB
		$db = new \DB\SQL('mysql:host='.$f3->get('db_host').';dbname='.$f3->get('db_name'),$f3->get('db_username'), $f3->get('db_password'));
		$f3->set('DB', $db);

	}

}
