1
0
Fork 0
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

58 lines
1.0 KiB
PHP

<?php
/**
* Informatica Eindproject D4p
* 6in3, Stedelijk Gymnasium Nijmegen
* Docent: Hans de Wolf
*
* ==================
*
* Daniel Boutros,
* Christiaan Goossens,
* Jelmer Hinssen
*/
namespace Inforbank\Application\Helper\Idob;
use Inforbank\Application;
/**
* Used for client authentication in IDOB
*/
class Client
{
private $client;
public function __construct($id)
{
$container = Application::getContainer();
$db = $container->db;
$this->client = $db->idobc->where("clientId", $id)->limit(1)->fetch();
if (!$this->client) {
throw new \Exception("There is no client with this id");
}
}
public function getClientSecret()
{
return $this->client['clientSecret'];
}
public function getClientRedirectURI()
{
return $this->client['redirectUri'];
}
public function getClientName()
{
return $this->client['naam'];
}
public function getClientRekening()
{
return $this->client['rekeningnr'];
}
}