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.

46 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;
use Inforbank\Application;
class Rekeningen
{
public static function getCurrentUserRekeningen()
{
$container = Application::getContainer();
$user = $container->auth->getUserID();
$db = $container->db;
$ibanhelper = new IBAN;
$rekeningen = $db->rekeningen->where('klantid', $user);
$returnArray = array();
foreach ($rekeningen as $rekening) {
$returnArray[] = array(
"iban" => $ibanhelper->getIBAN($rekening['rekeningnr']),
"nr" => $rekening['rekeningnr'],
"saldo" => (double) $rekening['saldo'],
"typeid" => $rekening['typeid']
);
$returnArray = array_push($returnArray, $db->types->where($rekening['typeid'], 'typeid'));
}
return $returnArray;
}
}