Finalized IDOB + small changes concerning redirects
This commit is contained in:
54
src/Application/Helper/Idob/Client.php
Normal file
54
src/Application/Helper/Idob/Client.php
Normal file
@ -0,0 +1,54 @@
|
||||
<?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;
|
||||
|
||||
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'];
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user