battles/classes/Battles/Models/PresentsModel.php

26 lines
462 B
PHP
Raw Normal View History

2020-07-04 10:49:43 +00:00
<?php
/**
* Author: lopiu
* Date: 04.07.2020
* Time: 13:17
*/
namespace Battles\Models;
use Battles\Database\Db;
2020-07-04 10:49:43 +00:00
class PresentsModel
{
protected $DB;
public function __construct(int $user_id)
{
2020-07-22 09:27:05 +00:00
if (!$this->DB) {
$this->DB = Db::getInstance()->execute('SELECT sender_id, image FROM `users_presents` WHERE owner_id = ?', $user_id);
2020-07-22 09:27:05 +00:00
}
}
public function getAllPresents()
{
return $this->DB;
}
2020-07-04 10:49:43 +00:00
}