File: /var/www/vhosts/creativefellows.nl/test.creativefellows.nl/geomil/classes/GeomilController.php
<?php
class GeomilController extends CassetteController{
function __construct($db_connection,$router=null,$view=null,$settings=null)
{
$this->db = $db_connection;
$this->router = $router;
$this->view = $view;
$this->settings = $settings;
$this->client_settings = $this->getClientSettings();
$this->config = new BaseController($this->settings,$this->client_settings);
}
private function getClientSettings()
{
$sql = "SELECT * FROM `instellingen` WHERE `id`='1'";
$sth = $this->db->prepare($sql);
$settings = $sth->execute();
if($settings) return $sth->fetch();
}
public function getResource($request, $response, $args)
{
//die("here");
// get url parameters
$this->get_uid = isset($args["uid"]) ? $args["uid"] : 0;
// get page contents
$data = $this->getEntryById($this->get_uid);
// return the page
return $this->view->render($response, "view.orbit.php", [
"resource" => $data
]);
}
}
?>