battles/classes/u.php
2018-03-03 02:34:12 +02:00

32 lines
525 B
PHP

<?php
/**
* Copyright (c) 2018.
* Author: Igor Barkov <lopar.4ever@gmail.com>
* Project name: Battles-Game
*/
class u
{
private $user_id;
/**
* u constructor.
* @param $playerId
*/
public function __construct($playerId)
{
if (!$this->user_id) {
$this->user_id = db::c()->query('SELECT * FROM `users` WHERE `id` = ?i',$playerId)->fetch_assoc();
}
}
/**
* @return array
*/
public function i()
{
return $this->user_id;
}
}