battles/classes/Battles/Models/Presents.php
Ivor Barhansky 0398425205 Code smell.
2022-12-17 03:03:56 +02:00

24 lines
427 B
PHP

<?php
/**
* Author: lopiu
* Date: 04.07.2020
* Time: 13:17
*/
namespace Battles\Models;
use Battles\Database\Db;
use Battles\User;
class Presents
{
public function getAll($userId = null)
{
if (is_null($userId)) {
$userId = User::getInstance()->getId();
}
return Db::getInstance()->execute('SELECT sender_id, image FROM `users_presents` WHERE owner_id = ?', $userId);
}
}