1
0

Cleanup, added docs & RC 2

This commit is contained in:
2017-04-04 08:26:11 +02:00
parent 21e67b0298
commit 3ee95398c4
18 changed files with 145 additions and 63 deletions

View File

@ -18,6 +18,10 @@ use Inforbank\Application;
class Berichten
{
/**
* Get all messages for a user
* @return array
*/
public static function getUserBerichten()
{
$container = Application::getContainer();
@ -36,7 +40,7 @@ class Berichten
"datum" => $datum,
"gelezen" => $bericht['gelezen']
);
if(!$bericht['gelezen']){
if (!$bericht['gelezen']) {
$bericht->update([
"gelezen" => true
]);
@ -46,6 +50,12 @@ class Berichten
return $berichtArray;
}
/**
* Send new message
* @param int $user Klantid
* @param string $afzender String name of the sender
* @param string $bericht Message
*/
public static function newBericht($user, $afzender, $bericht)
{
$container = Application::getContainer();